From c483a488bb9b8c965c42c3bf9d8cdbad944496a0 Mon Sep 17 00:00:00 2001 From: Andre Kirchhoff Date: Thu, 27 Jan 2022 18:30:18 -0300 Subject: [PATCH] update location_share default to LocUnset --- app/src/main/java/com/geeksville/mesh/model/UIState.kt | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/app/src/main/java/com/geeksville/mesh/model/UIState.kt b/app/src/main/java/com/geeksville/mesh/model/UIState.kt index 708251753..b33f2bfd3 100644 --- a/app/src/main/java/com/geeksville/mesh/model/UIState.kt +++ b/app/src/main/java/com/geeksville/mesh/model/UIState.kt @@ -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