mirror of
https://github.com/tachiyomiorg/tachiyomi.git
synced 2024-11-10 02:05:09 +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) {
|
if (config?.showNewChapter == false) {
|
||||||
systemUi?.show()
|
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()
|
chapters_bottom_sheet.sheetBehavior?.collapse()
|
||||||
}
|
}
|
||||||
if (chapters_bottom_sheet.selectedChapterId != page.chapter.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.shouldCollapse = true
|
||||||
|
|
||||||
// Set seekbar progress
|
// Set seekbar progress
|
||||||
page_seekbar.max = pages.lastIndex
|
page_seekbar.max = pages.lastIndex
|
||||||
|
@ -32,7 +32,7 @@ class ReaderChapterSheet @JvmOverloads constructor(context: Context, attrs: Attr
|
|||||||
lateinit var presenter: ReaderPresenter
|
lateinit var presenter: ReaderPresenter
|
||||||
var adapter: FastAdapter<ReaderChapterItem>? = null
|
var adapter: FastAdapter<ReaderChapterItem>? = null
|
||||||
private val itemAdapter = ItemAdapter<ReaderChapterItem>()
|
private val itemAdapter = ItemAdapter<ReaderChapterItem>()
|
||||||
var shouldCollaspe = true
|
var shouldCollapse = true
|
||||||
var selectedChapterId = -1L
|
var selectedChapterId = -1L
|
||||||
|
|
||||||
fun setup(activity: ReaderActivity) {
|
fun setup(activity: ReaderActivity) {
|
||||||
@ -68,7 +68,7 @@ class ReaderChapterSheet @JvmOverloads constructor(context: Context, attrs: Attr
|
|||||||
|
|
||||||
override fun onStateChanged(p0: View, state: Int) {
|
override fun onStateChanged(p0: View, state: Int) {
|
||||||
if (state == BottomSheetBehavior.STATE_COLLAPSED) {
|
if (state == BottomSheetBehavior.STATE_COLLAPSED) {
|
||||||
shouldCollaspe = true
|
shouldCollapse = true
|
||||||
sheetBehavior?.isHideable = false
|
sheetBehavior?.isHideable = false
|
||||||
(chapter_recycler.layoutManager as LinearLayoutManager).scrollToPositionWithOffset(
|
(chapter_recycler.layoutManager as LinearLayoutManager).scrollToPositionWithOffset(
|
||||||
adapter?.getPosition(presenter.getCurrentChapter()?.chapter?.id ?: 0L) ?: 0,
|
adapter?.getPosition(presenter.getCurrentChapter()?.chapter?.id ?: 0L) ?: 0,
|
||||||
@ -86,7 +86,7 @@ class ReaderChapterSheet @JvmOverloads constructor(context: Context, attrs: Attr
|
|||||||
chapter_recycler.adapter = adapter
|
chapter_recycler.adapter = adapter
|
||||||
adapter?.onClickListener = { _, _, item, _ ->
|
adapter?.onClickListener = { _, _, item, _ ->
|
||||||
if (item.chapter.id != presenter.getCurrentChapter()?.chapter?.id) {
|
if (item.chapter.id != presenter.getCurrentChapter()?.chapter?.id) {
|
||||||
shouldCollaspe = false
|
shouldCollapse = false
|
||||||
presenter.loadChapter(item.chapter)
|
presenter.loadChapter(item.chapter)
|
||||||
}
|
}
|
||||||
true
|
true
|
||||||
|
Loading…
Reference in New Issue
Block a user