mirror of
https://github.com/meshtastic/Meshtastic-Android.git
synced 2026-04-20 22:23:37 +00:00
remove MyPreferences
This commit is contained in:
parent
ab020713bd
commit
6211015495
2 changed files with 2 additions and 7 deletions
|
|
@ -1,5 +0,0 @@
|
|||
package com.geeksville.mesh.model
|
||||
|
||||
object MyPreferences {
|
||||
val provideLocationKey = "provide-location"
|
||||
}
|
||||
|
|
@ -284,12 +284,12 @@ class UIViewModel @Inject constructor(
|
|||
private val _ownerName = MutableLiveData<String?>()
|
||||
val ownerName: LiveData<String?> get() = _ownerName
|
||||
|
||||
val provideLocation = object : MutableLiveData<Boolean>(preferences.getBoolean(MyPreferences.provideLocationKey, false)) {
|
||||
val provideLocation = object : MutableLiveData<Boolean>(preferences.getBoolean("provide-location", false)) {
|
||||
override fun setValue(value: Boolean) {
|
||||
super.setValue(value)
|
||||
|
||||
preferences.edit {
|
||||
this.putBoolean(MyPreferences.provideLocationKey, value)
|
||||
this.putBoolean("provide-location", value)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue