Allow search bar to enter resting position when clock widget is not set to fill height and search bar is set to top

This commit is contained in:
MM20 2023-04-20 20:30:08 +02:00
parent 65426a8d9e
commit f74ad3c195
No known key found for this signature in database
GPG Key ID: 0B61A8F2DEAFA389
2 changed files with 2 additions and 2 deletions

View File

@ -483,7 +483,7 @@ fun PagerScaffold(
derivedStateOf {
when {
pagerState.currentPageOffsetFraction != 0f -> SearchBarLevel.Raised
!isSearchOpen && isWidgetsScrollZero && fillClockHeight -> SearchBarLevel.Resting
!isSearchOpen && isWidgetsScrollZero && (fillClockHeight || !bottomSearchBar) -> SearchBarLevel.Resting
isSearchOpen && isSearchAtTop && !bottomSearchBar -> SearchBarLevel.Active
isSearchOpen && isSearchAtBottom && bottomSearchBar -> SearchBarLevel.Active
else -> SearchBarLevel.Raised

View File

@ -509,7 +509,7 @@ fun PullDownScaffold(
derivedStateOf {
when {
offsetY.value != 0f -> SearchBarLevel.Raised
!isSearchOpen && isWidgetsAtStart && fillClockHeight -> SearchBarLevel.Resting
!isSearchOpen && isWidgetsAtStart && (fillClockHeight || !bottomSearchBar) -> SearchBarLevel.Resting
isSearchOpen && isSearchAtTop && !bottomSearchBar -> SearchBarLevel.Active
isSearchOpen && isSearchAtBottom && bottomSearchBar -> SearchBarLevel.Active
else -> SearchBarLevel.Raised