summaryrefslogtreecommitdiff
path: root/app
diff options
context:
space:
mode:
authorjacquarg <guillaume.jacquart@hoodbrains.com>2022-01-23 19:59:02 +0100
committerjacquarg <guillaume.jacquart@hoodbrains.com>2022-01-26 18:43:08 +0100
commit15e40cdd3b4a9d45f3508195083d4e73b5deed1a (patch)
tree422b1bdd023ad0171706f3eed3ed3f44f9058da2 /app
parent16a3188ef42a6ae2ed0df707a6b6fcc53b530c37 (diff)
Deactivate geolocation options while big btn is off
Diffstat (limited to 'app')
-rw-r--r--app/src/main/java/foundation/e/privacycentralapp/features/location/FakeLocationFragment.kt18
1 files changed, 14 insertions, 4 deletions
diff --git a/app/src/main/java/foundation/e/privacycentralapp/features/location/FakeLocationFragment.kt b/app/src/main/java/foundation/e/privacycentralapp/features/location/FakeLocationFragment.kt
index 60b9bd9..76c586c 100644
--- a/app/src/main/java/foundation/e/privacycentralapp/features/location/FakeLocationFragment.kt
+++ b/app/src/main/java/foundation/e/privacycentralapp/features/location/FakeLocationFragment.kt
@@ -222,10 +222,20 @@ class FakeLocationFragment :
@SuppressLint("MissingPermission")
override fun render(state: FakeLocationFeature.State) {
- binding.radioUseRandomLocation.isChecked = (state.mode == LocationMode.RANDOM_LOCATION)
- binding.radioUseSpecificLocation.isChecked =
- (state.mode == LocationMode.SPECIFIC_LOCATION)
- binding.radioUseRealLocation.isChecked = (state.mode == LocationMode.REAL_LOCATION)
+ binding.radioUseRandomLocation.apply {
+ isChecked = state.mode == LocationMode.RANDOM_LOCATION
+ isEnabled = state.isEnabled
+ }
+
+ binding.radioUseSpecificLocation.apply {
+ isChecked = state.mode == LocationMode.SPECIFIC_LOCATION
+ isEnabled = state.isEnabled
+ }
+
+ binding.radioUseRealLocation.apply {
+ isChecked = state.mode == LocationMode.REAL_LOCATION
+ isEnabled = state.isEnabled
+ }
binding.mapView.isEnabled = (state.mode == LocationMode.SPECIFIC_LOCATION)