mirror of
https://github.com/tachiyomiorg/tachiyomi.git
synced 2024-12-23 19:51:50 +01:00
Fixed typo in reader chapter sheet
This commit is contained in:
parent
27b68f5afb
commit
8986de3db4
@ -557,13 +557,13 @@ class ReaderActivity : BaseRxActivity<ReaderPresenter>(),
|
||||
if (config?.showNewChapter == false) {
|
||||
systemUi?.show()
|
||||
}
|
||||
} else if (chapters_bottom_sheet.shouldCollaspe && chapters_bottom_sheet.sheetBehavior.isExpanded()) {
|
||||
} else if (chapters_bottom_sheet.shouldCollapse && chapters_bottom_sheet.sheetBehavior.isExpanded()) {
|
||||
chapters_bottom_sheet.sheetBehavior?.collapse()
|
||||
}
|
||||
if (chapters_bottom_sheet.selectedChapterId != page.chapter.chapter.id) {
|
||||
chapters_bottom_sheet.refreshList()
|
||||
}
|
||||
chapters_bottom_sheet.shouldCollaspe = true
|
||||
chapters_bottom_sheet.shouldCollapse = true
|
||||
|
||||
// Set seekbar progress
|
||||
page_seekbar.max = pages.lastIndex
|
||||
|
@ -32,7 +32,7 @@ class ReaderChapterSheet @JvmOverloads constructor(context: Context, attrs: Attr
|
||||
lateinit var presenter: ReaderPresenter
|
||||
var adapter: FastAdapter<ReaderChapterItem>? = null
|
||||
private val itemAdapter = ItemAdapter<ReaderChapterItem>()
|
||||
var shouldCollaspe = true
|
||||
var shouldCollapse = true
|
||||
var selectedChapterId = -1L
|
||||
|
||||
fun setup(activity: ReaderActivity) {
|
||||
@ -68,7 +68,7 @@ class ReaderChapterSheet @JvmOverloads constructor(context: Context, attrs: Attr
|
||||
|
||||
override fun onStateChanged(p0: View, state: Int) {
|
||||
if (state == BottomSheetBehavior.STATE_COLLAPSED) {
|
||||
shouldCollaspe = true
|
||||
shouldCollapse = true
|
||||
sheetBehavior?.isHideable = false
|
||||
(chapter_recycler.layoutManager as LinearLayoutManager).scrollToPositionWithOffset(
|
||||
adapter?.getPosition(presenter.getCurrentChapter()?.chapter?.id ?: 0L) ?: 0,
|
||||
@ -86,7 +86,7 @@ class ReaderChapterSheet @JvmOverloads constructor(context: Context, attrs: Attr
|
||||
chapter_recycler.adapter = adapter
|
||||
adapter?.onClickListener = { _, _, item, _ ->
|
||||
if (item.chapter.id != presenter.getCurrentChapter()?.chapter?.id) {
|
||||
shouldCollaspe = false
|
||||
shouldCollapse = false
|
||||
presenter.loadChapter(item.chapter)
|
||||
}
|
||||
true
|
||||
|
Loading…
Reference in New Issue
Block a user