Skip to content

Commit

Permalink
fix: font size for game type in Board theme settings
Browse files Browse the repository at this point in the history
  • Loading branch information
kaajjo committed Apr 15, 2024
1 parent c60ebfc commit 29e7807
Showing 1 changed file with 6 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -64,12 +64,6 @@ fun SettingsBoardTheme(
val boardCrossHighlight by viewModel.crossHighlight.collectAsStateWithLifecycle(initialValue = PreferencesConstants.DEFAULT_BOARD_CROSS_HIGHLIGHT)
val fontSize by viewModel.fontSize.collectAsStateWithLifecycle(initialValue = PreferencesConstants.DEFAULT_FONT_SIZE_FACTOR)

val fontSizeValue by remember(fontSize) {
mutableStateOf(
SudokuUtils().getFontSize(GameType.Default9x9, fontSize)
)
}

var fontSizeDialog by rememberSaveable {
mutableStateOf(false)
}
Expand All @@ -83,6 +77,12 @@ fun SettingsBoardTheme(
mutableStateOf(GameType.Default9x9)
}

val fontSizeValue by remember(fontSize, selectedBoardType) {
mutableStateOf(
SudokuUtils().getFontSize(selectedBoardType, fontSize)
)
}

Scaffold(
modifier = Modifier.nestedScroll(scrollBehavior.nestedScrollConnection),
topBar = {
Expand Down

0 comments on commit 29e7807

Please sign in to comment.