mirror of
https://github.com/meshtastic/Meshtastic-Android.git
synced 2026-04-03 21:53:55 -04:00
remove MyPreferences
This commit is contained in:
@@ -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)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user