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
|
|
@ -47,6 +47,7 @@ import kotlinx.coroutines.flow.stateIn
|
|||
import kotlinx.coroutines.flow.update
|
||||
import kotlinx.coroutines.launch
|
||||
import kotlinx.coroutines.withContext
|
||||
import org.meshtastic.core.datastore.UiPreferencesDataSource
|
||||
import org.meshtastic.core.prefs.ui.UiPrefs
|
||||
import java.io.BufferedWriter
|
||||
import java.io.FileNotFoundException
|
||||
|
|
@ -65,6 +66,7 @@ constructor(
|
|||
private val nodeRepository: NodeRepository,
|
||||
private val meshLogRepository: MeshLogRepository,
|
||||
private val uiPrefs: UiPrefs,
|
||||
private val uiPreferencesDataSource: UiPreferencesDataSource,
|
||||
) : ViewModel(),
|
||||
Logging {
|
||||
val myNodeInfo: StateFlow<MyNodeEntity?> = nodeRepository.myNodeInfo
|
||||
|
|
@ -109,11 +111,11 @@ constructor(
|
|||
}
|
||||
|
||||
fun setTheme(theme: Int) {
|
||||
uiPrefs.theme = theme
|
||||
uiPreferencesDataSource.setTheme(theme)
|
||||
}
|
||||
|
||||
fun showAppIntro() {
|
||||
uiPrefs.appIntroCompleted = false
|
||||
uiPreferencesDataSource.setAppIntroCompleted(false)
|
||||
}
|
||||
|
||||
fun unlockExcludedModules() {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue