Fix missing appbar when statistics are loading

This commit is contained in:
arkon 2023-05-12 18:13:07 -04:00
parent ce81b76150
commit 8fae92034e

View File

@ -24,11 +24,6 @@ class StatsScreen : Screen {
val screenModel = rememberScreenModel { StatsScreenModel() }
val state by screenModel.state.collectAsState()
if (state is StatsScreenState.Loading) {
LoadingScreen()
return
}
Scaffold(
topBar = { scrollBehavior ->
AppBar(
@ -38,6 +33,11 @@ class StatsScreen : Screen {
)
},
) { paddingValues ->
if (state is StatsScreenState.Loading) {
LoadingScreen()
return@Scaffold
}
StatsScreenContent(
state = state as StatsScreenState.Success,
paddingValues = paddingValues,