mirror of
https://github.com/null2264/yokai.git
synced 2025-06-21 10:44:42 +00:00
Reader no longer hides menu when double page spreads zoom in for certain conditions
For example, while scrubbing through chapters and when scrolling through pages while the current page is zooming in
This commit is contained in:
parent
480567419f
commit
a70a05c99b
3 changed files with 10 additions and 3 deletions
|
@ -227,7 +227,7 @@ class ReaderActivity : BaseActivity<ReaderActivityBinding>() {
|
|||
field = value
|
||||
(viewer as? PagerViewer)?.config?.hingeGapSize = value
|
||||
}
|
||||
val decimalFormat by lazy {
|
||||
private val decimalFormat by lazy {
|
||||
DecimalFormat(
|
||||
"#.###",
|
||||
DecimalFormatSymbols()
|
||||
|
@ -1080,7 +1080,7 @@ class ReaderActivity : BaseActivity<ReaderActivityBinding>() {
|
|||
}
|
||||
|
||||
fun hideMenu() {
|
||||
if (menuVisible) {
|
||||
if (menuVisible && !isScrollingThroughPagesOrChapters) {
|
||||
setMenuVisibility(false)
|
||||
}
|
||||
}
|
||||
|
|
|
@ -181,7 +181,7 @@ class PagerPageHolder(
|
|||
|
||||
override fun onScaleChanged(newScale: Float) {
|
||||
super.onScaleChanged(newScale)
|
||||
viewer.activity.hideMenu()
|
||||
viewer.hideMenuIfVisible(item)
|
||||
}
|
||||
|
||||
override fun onImageLoadError() {
|
||||
|
|
|
@ -487,4 +487,11 @@ abstract class PagerViewer(val activity: ReaderActivity) : BaseViewer {
|
|||
}
|
||||
return false
|
||||
}
|
||||
|
||||
fun hideMenuIfVisible(item: Any) {
|
||||
val currentItem = adapter.joinedItems.getOrNull(pager.currentItem)
|
||||
if (item == currentItem && isIdle) {
|
||||
activity.hideMenu()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue