File tree Expand file tree Collapse file tree
composeApp/src/commonMain/kotlin/net/solvetheriddle/roundtimer Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -64,6 +64,7 @@ import androidx.compose.ui.unit.sp
6464import kotlinx.coroutines.launch
6565import net.solvetheriddle.roundtimer.model.Game
6666import net.solvetheriddle.roundtimer.model.TimerState
67+ import net.solvetheriddle.roundtimer.model.sortedChronologically
6768import net.solvetheriddle.roundtimer.ui.components.SetAppropriateStatusBarColor
6869import net.solvetheriddle.roundtimer.ui.utils.rememberIsLandscape
6970
@@ -88,6 +89,10 @@ fun GamesScreen(
8889 val snackbarHostState = remember { SnackbarHostState () }
8990 val scope = rememberCoroutineScope()
9091
92+ val sortedGames = remember(state.games) {
93+ state.games.sortedChronologically()
94+ }
95+
9196 SetAppropriateStatusBarColor ()
9297
9398 if (showEditDialog && gameToEdit != null ) {
@@ -128,10 +133,6 @@ fun GamesScreen(
128133
129134 val isLandscape = rememberIsLandscape()
130135
131- val sortedGames = remember(state.games) {
132- state.games.sortedChronologically()
133- }
134-
135136 Scaffold (
136137 snackbarHost = { SnackbarHost (snackbarHostState) },
137138 topBar = {
Original file line number Diff line number Diff line change @@ -27,6 +27,7 @@ import net.solvetheriddle.roundtimer.model.ScheduledSound
2727import net.solvetheriddle.roundtimer.model.Sound
2828import net.solvetheriddle.roundtimer.model.Round
2929import net.solvetheriddle.roundtimer.model.TimerState
30+ import net.solvetheriddle.roundtimer.model.sortedChronologically
3031import net.solvetheriddle.roundtimer.platform.getScreenLocker
3132import net.solvetheriddle.roundtimer.platform.getSoundPlayer
3233import net.solvetheriddle.roundtimer.platform.getAnalyticsService
You can’t perform that action at this time.
0 commit comments