SettingsViewModel
class SettingsViewModel(val scope: CoroutineScope, val appState: AppStateImpl, val globalError: ReversiException? = null, val setTheme: (AppTheme) -> Unit, val setPlayerName: suspend (String?) -> Unit, val saveGame: suspend () -> Unit, val setGame: (Game) -> Unit, val setGlobalError: (Exception?, ErrorType?) -> Unit) : ViewModel<SettingsUiState>
ViewModel for the settings page screen. Manages settings changes, audio volume, theme selection, and persistence.
Properties
Link copied to clipboard
The mutable internal UI state.
Link copied to clipboard
The global application state.
Link copied to clipboard
Optional global error to display on initial load.
Link copied to clipboard
Callback function to update global error state.
Link copied to clipboard
Callback function to update the player name.
Functions
Link copied to clipboard
fun applySettings(oldTheme: AppTheme, newName: String?, newTheme: AppTheme, draftCoreConfig: CoreConfig, volume: Float, endAction: () -> Unit)
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard