mirror of
https://github.com/null2264/yokai.git
synced 2025-06-21 10:44:42 +00:00
fix tab bar showing when starting a download from details
only happens when going to the details page from recents
This commit is contained in:
parent
ffd220a480
commit
7dfd3d0fe2
1 changed files with 9 additions and 4 deletions
|
@ -239,6 +239,11 @@ class RecentsController(bundle: Bundle? = null) :
|
|||
(progress * 2f).coerceIn(0f, 1f)
|
||||
)
|
||||
)
|
||||
val oldShow = showingDownloads
|
||||
showingDownloads = progress > 0.92f
|
||||
if (router.backstack.lastOrNull()?.controller != this@RecentsController) {
|
||||
return
|
||||
}
|
||||
binding.downloadBottomSheet.root.backgroundTintList =
|
||||
binding.downloadBottomSheet.sheetLayout.backgroundTintList
|
||||
activityBinding?.appBar?.y = max(
|
||||
|
@ -253,8 +258,6 @@ class RecentsController(bundle: Bundle? = null) :
|
|||
tabs.isVisible = true
|
||||
}
|
||||
}
|
||||
val oldShow = showingDownloads
|
||||
showingDownloads = progress > 0.92f
|
||||
if (oldShow != showingDownloads) {
|
||||
updateTitleAndMenu()
|
||||
activity?.invalidateOptionsMenu()
|
||||
|
@ -272,8 +275,10 @@ class RecentsController(bundle: Bundle? = null) :
|
|||
activity?.invalidateOptionsMenu()
|
||||
}
|
||||
|
||||
activityBinding?.tabsFrameLayout?.isVisible =
|
||||
state != BottomSheetBehavior.STATE_EXPANDED
|
||||
if (router.backstack.lastOrNull()?.controller == this@RecentsController) {
|
||||
activityBinding?.tabsFrameLayout?.isVisible =
|
||||
state != BottomSheetBehavior.STATE_EXPANDED
|
||||
}
|
||||
if (state == BottomSheetBehavior.STATE_COLLAPSED) {
|
||||
if (hasQueue()) {
|
||||
binding.downloadBottomSheet.dlBottomSheet.sheetBehavior?.isHideable =
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue