Fixed selected chapter in list not updating

This commit is contained in:
Jay 2020-04-15 00:03:30 -04:00
parent 02896679fe
commit 3d6ad28437

View File

@ -510,7 +510,7 @@ class ReaderActivity : BaseRxActivity<ReaderPresenter>(),
} else if (chapters_bottom_sheet.shouldCollaspe && chapters_bottom_sheet.sheetBehavior?.state == BottomSheetBehavior.STATE_EXPANDED) { } else if (chapters_bottom_sheet.shouldCollaspe && chapters_bottom_sheet.sheetBehavior?.state == BottomSheetBehavior.STATE_EXPANDED) {
chapters_bottom_sheet.sheetBehavior?.state = BottomSheetBehavior.STATE_COLLAPSED chapters_bottom_sheet.sheetBehavior?.state = BottomSheetBehavior.STATE_COLLAPSED
} }
if (chapters_bottom_sheet.selectedChapterId != presenter.getCurrentChapter()?.chapter?.id) if (chapters_bottom_sheet.selectedChapterId != page.chapter.chapter.id)
chapters_bottom_sheet.refreshList() chapters_bottom_sheet.refreshList()
chapters_bottom_sheet.shouldCollaspe = true chapters_bottom_sheet.shouldCollaspe = true