fix: Show syncing indicator on top of the nav bar
This commit is contained in:
parent
92718d2fab
commit
2ef74f5310
|
@ -351,44 +351,46 @@ fun HomeScreenContent(
|
||||||
AnimatedVisibility(
|
AnimatedVisibility(
|
||||||
visible = bottomNavBarVisible,
|
visible = bottomNavBarVisible,
|
||||||
) {
|
) {
|
||||||
Column(
|
Box {
|
||||||
modifier = Modifier,
|
Column(
|
||||||
) {
|
modifier = Modifier,
|
||||||
BannerStatusBadge(
|
|
||||||
modifier = Modifier
|
|
||||||
.fillMaxWidth(),
|
|
||||||
statusState = accountStatusState,
|
|
||||||
)
|
|
||||||
Row(
|
|
||||||
modifier = Modifier
|
|
||||||
.fillMaxWidth()
|
|
||||||
.padding(bottomInsets.asPaddingValues())
|
|
||||||
.height(80.dp)
|
|
||||||
.selectableGroup(),
|
|
||||||
horizontalArrangement = Arrangement.SpaceBetween,
|
|
||||||
) {
|
) {
|
||||||
routes.forEach { r ->
|
BannerStatusBadge(
|
||||||
BottomNavigationControllerItem(
|
modifier = Modifier
|
||||||
backStack = backStack,
|
.fillMaxWidth(),
|
||||||
route = r.route,
|
statusState = accountStatusState,
|
||||||
icon = r.icon,
|
)
|
||||||
iconSelected = r.iconSelected,
|
Row(
|
||||||
label = if (navLabelState.value) {
|
modifier = Modifier
|
||||||
// composable
|
.fillMaxWidth()
|
||||||
{
|
.padding(bottomInsets.asPaddingValues())
|
||||||
Text(
|
.height(80.dp)
|
||||||
text = textResource(r.label),
|
.selectableGroup(),
|
||||||
maxLines = 1,
|
horizontalArrangement = Arrangement.SpaceBetween,
|
||||||
textAlign = TextAlign.Center,
|
) {
|
||||||
// Default style does not fit on devices with small
|
routes.forEach { r ->
|
||||||
// screens.
|
BottomNavigationControllerItem(
|
||||||
style = MaterialTheme.typography.labelSmall,
|
backStack = backStack,
|
||||||
)
|
route = r.route,
|
||||||
}
|
icon = r.icon,
|
||||||
} else {
|
iconSelected = r.iconSelected,
|
||||||
null
|
label = if (navLabelState.value) {
|
||||||
},
|
// composable
|
||||||
)
|
{
|
||||||
|
Text(
|
||||||
|
text = textResource(r.label),
|
||||||
|
maxLines = 1,
|
||||||
|
textAlign = TextAlign.Center,
|
||||||
|
// Default style does not fit on devices with small
|
||||||
|
// screens.
|
||||||
|
style = MaterialTheme.typography.labelSmall,
|
||||||
|
)
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
null
|
||||||
|
},
|
||||||
|
)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -400,7 +402,7 @@ fun HomeScreenContent(
|
||||||
accountStatusState.value.pending != null
|
accountStatusState.value.pending != null
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
AnimatedVisibility(
|
androidx.compose.animation.AnimatedVisibility(
|
||||||
visible = isSyncingState.value,
|
visible = isSyncingState.value,
|
||||||
) {
|
) {
|
||||||
LinearProgressIndicator(
|
LinearProgressIndicator(
|
||||||
|
|
Loading…
Reference in New Issue