diff options
author | jacquarg <guillaume.jacquart@hoodbrains.com> | 2022-01-23 19:59:02 +0100 |
---|---|---|
committer | jacquarg <guillaume.jacquart@hoodbrains.com> | 2022-01-26 18:43:08 +0100 |
commit | 15e40cdd3b4a9d45f3508195083d4e73b5deed1a (patch) | |
tree | 422b1bdd023ad0171706f3eed3ed3f44f9058da2 /app/src/main/java/foundation | |
parent | 16a3188ef42a6ae2ed0df707a6b6fcc53b530c37 (diff) |
Deactivate geolocation options while big btn is off
Diffstat (limited to 'app/src/main/java/foundation')
-rw-r--r-- | app/src/main/java/foundation/e/privacycentralapp/features/location/FakeLocationFragment.kt | 18 |
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) |