mirror of
https://github.com/tachiyomiorg/tachiyomi.git
synced 2025-02-09 04:43:25 +01:00
Possibly Fix reader bottom sheet sometimes not showwing
This commit is contained in:
parent
6c581dd0fc
commit
053a5149c2
@ -63,6 +63,7 @@ import eu.kanade.tachiyomi.util.system.GLUtil
|
|||||||
import eu.kanade.tachiyomi.util.system.ThemeUtil
|
import eu.kanade.tachiyomi.util.system.ThemeUtil
|
||||||
import eu.kanade.tachiyomi.util.system.contextCompatColor
|
import eu.kanade.tachiyomi.util.system.contextCompatColor
|
||||||
import eu.kanade.tachiyomi.util.system.dpToPx
|
import eu.kanade.tachiyomi.util.system.dpToPx
|
||||||
|
import eu.kanade.tachiyomi.util.system.getBottomGestureInsets
|
||||||
import eu.kanade.tachiyomi.util.system.getPrefTheme
|
import eu.kanade.tachiyomi.util.system.getPrefTheme
|
||||||
import eu.kanade.tachiyomi.util.system.getResourceColor
|
import eu.kanade.tachiyomi.util.system.getResourceColor
|
||||||
import eu.kanade.tachiyomi.util.system.hasSideNavBar
|
import eu.kanade.tachiyomi.util.system.hasSideNavBar
|
||||||
@ -653,6 +654,8 @@ class ReaderActivity :
|
|||||||
setMenuVisibility(menuVisible)
|
setMenuVisibility(menuVisible)
|
||||||
binding.chaptersSheet.chaptersBottomSheet.sheetBehavior?.isHideable = !menuVisible
|
binding.chaptersSheet.chaptersBottomSheet.sheetBehavior?.isHideable = !menuVisible
|
||||||
if (!menuVisible) binding.chaptersSheet.chaptersBottomSheet.sheetBehavior?.hide()
|
if (!menuVisible) binding.chaptersSheet.chaptersBottomSheet.sheetBehavior?.hide()
|
||||||
|
binding.chaptersSheet.root.sheetBehavior?.isGestureInsetBottomIgnored = true
|
||||||
|
val peek = 50.dpToPx
|
||||||
binding.readerLayout.doOnApplyWindowInsets { v, insets, _ ->
|
binding.readerLayout.doOnApplyWindowInsets { v, insets, _ ->
|
||||||
sheetManageNavColor = when {
|
sheetManageNavColor = when {
|
||||||
insets.isBottomTappable() -> {
|
insets.isBottomTappable() -> {
|
||||||
@ -685,11 +688,8 @@ class ReaderActivity :
|
|||||||
leftMargin = 12.dpToPx + insets.systemWindowInsetLeft
|
leftMargin = 12.dpToPx + insets.systemWindowInsetLeft
|
||||||
rightMargin = 12.dpToPx + insets.systemWindowInsetRight
|
rightMargin = 12.dpToPx + insets.systemWindowInsetRight
|
||||||
}
|
}
|
||||||
if (Build.VERSION.SDK_INT < Build.VERSION_CODES.Q) {
|
|
||||||
val peek = 50.dpToPx
|
|
||||||
binding.chaptersSheet.root.sheetBehavior?.peekHeight =
|
binding.chaptersSheet.root.sheetBehavior?.peekHeight =
|
||||||
peek + insets.systemWindowInsetBottom
|
peek + insets.getBottomGestureInsets()
|
||||||
}
|
|
||||||
binding.chaptersSheet.chapterRecycler.updatePaddingRelative(bottom = insets.systemWindowInsetBottom)
|
binding.chaptersSheet.chapterRecycler.updatePaddingRelative(bottom = insets.systemWindowInsetBottom)
|
||||||
binding.viewerContainer.requestLayout()
|
binding.viewerContainer.requestLayout()
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user