DefaultSoundSettingsViewModel
Default implementation of SoundSettingsViewModel.
Backed by a NavigationSettingsRepository: each property reactively maps one or more repository keys, and each setter writes through to the repository (which in turn drives NavigationSettingsApplier).
setSoundMode performs an atomic multi-key update so that switching the master mode re-applies the correct defaults for every dependent toggle.
Important: Call onCleared when the screen is destroyed to release the internal coroutine scope. When used via ru.dgis.sdk.compose.navigation.controls.defaultcontrols.navigation.DefaultNavigationControlsState, onCleared is called automatically. If used standalone, you must call it manually.
Parameters
Repository for reading and persisting sound settings.
Properties
Set of currently enabled camera-warning events.
Set of currently enabled non-camera event warnings.
Master output volume in the range 0..100.
Whether the speed-exceeding warning is enabled.
Speed-exceeding threshold in km/h (negative values represent driving below the limit).
Functions
Toggle a single camera event on or off.
Replace the full set of enabled camera events.
Toggle a single non-camera event on or off.
Replace the full set of enabled non-camera events.
Set the master sound mode. Switching modes also resets the camera/event toggles and speed-exceeding flag to mode defaults.
Set master output volume. The value is coerced into 0..100.
Enable or disable the speed-exceeding warning.
Set the speed-exceeding threshold in km/h.