Fix missing appbar when statistics are loading
This commit is contained in:
parent
ce81b76150
commit
8fae92034e
1 changed files with 5 additions and 5 deletions
|
@ -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,
|
||||
|
|
Reference in a new issue