update location_share default to LocUnset

This commit is contained in:
Andre Kirchhoff 2022-01-27 18:30:18 -03:00 committed by GitHub
parent 852cd2ddc7
commit c483a488bb
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -127,6 +127,7 @@ class UIViewModel(private val app: Application) : AndroidViewModel(app), Logging
var locationShare: Boolean?
get() {
return radioConfig.value?.preferences?.locationShare == RadioConfigProtos.LocationSharing.LocEnabled
|| radioConfig.value?.preferences?.locationShare == RadioConfigProtos.LocationSharing.LocUnset
}
set(value) {
val config = radioConfig.value
@ -134,7 +135,7 @@ class UIViewModel(private val app: Application) : AndroidViewModel(app), Logging
val builder = config.toBuilder()
if (value == true) {
builder.preferencesBuilder.locationShare =
RadioConfigProtos.LocationSharing.LocEnabled
RadioConfigProtos.LocationSharing.LocUnset
} else {
builder.preferencesBuilder.locationShare =
RadioConfigProtos.LocationSharing.LocDisabled