diff --git a/app/src/main/java/eu/kanade/tachiyomi/ui/stats/StatsScreen.kt b/app/src/main/java/eu/kanade/tachiyomi/ui/stats/StatsScreen.kt index 4a4363ad5..8f5c9bfe0 100644 --- a/app/src/main/java/eu/kanade/tachiyomi/ui/stats/StatsScreen.kt +++ b/app/src/main/java/eu/kanade/tachiyomi/ui/stats/StatsScreen.kt @@ -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,