mirror of
https://github.com/null2264/yokai.git
synced 2025-06-21 10:44:42 +00:00
fixed missing search bar on library
very specific use case of " in landscape, go to a tab, come back to library tab, rotate to portrait"
This commit is contained in:
parent
c99ea17249
commit
9cea16a34e
2 changed files with 5 additions and 3 deletions
|
@ -526,7 +526,7 @@ open class MainActivity : BaseActivity<MainActivityBinding>(), DownloadServiceLi
|
|||
val isAppBarVisible = binding.appBar.isVisible
|
||||
val needsAnim = if (showSearchBar) !binding.cardFrame.isVisible || binding.cardFrame.alpha < 1f
|
||||
else binding.cardFrame.isVisible || binding.cardFrame.alpha > 0f
|
||||
if (needsAnim && binding.appBar.useLargeToolbar && !onSmallerController &&
|
||||
if (this::router.isInitialized && needsAnim && binding.appBar.useLargeToolbar && !onSmallerController &&
|
||||
(showSearchAnyway || isAppBarVisible)
|
||||
) {
|
||||
binding.appBar.background = null
|
||||
|
@ -542,7 +542,9 @@ open class MainActivity : BaseActivity<MainActivityBinding>(), DownloadServiceLi
|
|||
tA.duration = (abs(binding.cardFrame.alpha - endValue) * 150).roundToLong()
|
||||
searchBarAnimation = tA
|
||||
tA.start()
|
||||
} else if (!binding.appBar.useLargeToolbar || onSmallerController || !isAppBarVisible) {
|
||||
} else if (this::router.isInitialized &&
|
||||
(!binding.appBar.useLargeToolbar || onSmallerController || !isAppBarVisible)
|
||||
) {
|
||||
binding.cardFrame.alpha = 1f
|
||||
binding.cardFrame.isVisible = showSearchBar
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue