mirror of
https://github.com/meshtastic/Meshtastic-Android.git
synced 2026-04-20 22:23:37 +00:00
Pref fixes (#3175)
This commit is contained in:
parent
c5c433c165
commit
a1d9f926cb
7 changed files with 99 additions and 29 deletions
|
|
@ -81,6 +81,7 @@ import kotlinx.coroutines.flow.shareIn
|
|||
import kotlinx.coroutines.flow.stateIn
|
||||
import kotlinx.coroutines.flow.update
|
||||
import kotlinx.coroutines.launch
|
||||
import org.meshtastic.core.datastore.UiPreferencesDataSource
|
||||
import org.meshtastic.core.model.DeviceHardware
|
||||
import org.meshtastic.core.prefs.ui.UiPrefs
|
||||
import org.meshtastic.core.strings.R
|
||||
|
|
@ -188,11 +189,12 @@ constructor(
|
|||
private val quickChatActionRepository: QuickChatActionRepository,
|
||||
firmwareReleaseRepository: FirmwareReleaseRepository,
|
||||
private val uiPrefs: UiPrefs,
|
||||
private val uiPreferencesDataSource: UiPreferencesDataSource,
|
||||
private val meshServiceNotifications: MeshServiceNotifications,
|
||||
) : ViewModel(),
|
||||
Logging {
|
||||
|
||||
val theme: StateFlow<Int> = uiPrefs.themeFlow
|
||||
val theme: StateFlow<Int> = uiPreferencesDataSource.theme
|
||||
|
||||
private val _lastTraceRouteTime = MutableStateFlow<Long?>(null)
|
||||
val lastTraceRouteTime: StateFlow<Long?> = _lastTraceRouteTime.asStateFlow()
|
||||
|
|
@ -822,9 +824,9 @@ constructor(
|
|||
nodeFilterText.value = text
|
||||
}
|
||||
|
||||
val appIntroCompleted: StateFlow<Boolean> = uiPrefs.appIntroCompletedFlow
|
||||
val appIntroCompleted: StateFlow<Boolean> = uiPreferencesDataSource.appIntroCompleted
|
||||
|
||||
fun onAppIntroCompleted() {
|
||||
uiPrefs.appIntroCompleted = true
|
||||
uiPreferencesDataSource.setAppIntroCompleted(true)
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue