|
@@ -69,7 +69,8 @@ fun AppStateBanners(
|
|
val mainInsets = WindowInsets.statusBars
|
|
val mainInsets = WindowInsets.statusBars
|
|
val mainInsetsTop = mainInsets.getTop(density)
|
|
val mainInsetsTop = mainInsets.getTop(density)
|
|
SubcomposeLayout(modifier = modifier) { constraints ->
|
|
SubcomposeLayout(modifier = modifier) { constraints ->
|
|
- val indexingPlaceable = subcompose(0) {
|
|
|
|
|
|
+ val indexingId = if (indexing) 0 else -1
|
|
|
|
+ val indexingPlaceable = subcompose(indexingId) {
|
|
AnimatedVisibility(
|
|
AnimatedVisibility(
|
|
visible = indexing,
|
|
visible = indexing,
|
|
enter = expandVertically(),
|
|
enter = expandVertically(),
|
|
@@ -82,7 +83,8 @@ fun AppStateBanners(
|
|
}.fastMap { it.measure(constraints) }
|
|
}.fastMap { it.measure(constraints) }
|
|
val indexingHeight = indexingPlaceable.fastMaxBy { it.height }?.height ?: 0
|
|
val indexingHeight = indexingPlaceable.fastMaxBy { it.height }?.height ?: 0
|
|
|
|
|
|
- val downloadedOnlyPlaceable = subcompose(1) {
|
|
|
|
|
|
+ val downloadedId = if (indexing) 1 else 0
|
|
|
|
+ val downloadedOnlyPlaceable = subcompose(downloadedId) {
|
|
AnimatedVisibility(
|
|
AnimatedVisibility(
|
|
visible = downloadedOnlyMode,
|
|
visible = downloadedOnlyMode,
|
|
enter = expandVertically(),
|
|
enter = expandVertically(),
|
|
@@ -96,7 +98,12 @@ fun AppStateBanners(
|
|
}.fastMap { it.measure(constraints) }
|
|
}.fastMap { it.measure(constraints) }
|
|
val downloadedOnlyHeight = downloadedOnlyPlaceable.fastMaxBy { it.height }?.height ?: 0
|
|
val downloadedOnlyHeight = downloadedOnlyPlaceable.fastMaxBy { it.height }?.height ?: 0
|
|
|
|
|
|
- val incognitoPlaceable = subcompose(2) {
|
|
|
|
|
|
+ val incognitoId = when {
|
|
|
|
+ indexing && downloadedOnlyMode -> 3
|
|
|
|
+ indexing || downloadedOnlyMode -> 2
|
|
|
|
+ else -> 1
|
|
|
|
+ }
|
|
|
|
+ val incognitoPlaceable = subcompose(incognitoId) {
|
|
AnimatedVisibility(
|
|
AnimatedVisibility(
|
|
visible = incognitoMode,
|
|
visible = incognitoMode,
|
|
enter = expandVertically(),
|
|
enter = expandVertically(),
|