summaryrefslogtreecommitdiff
path: root/app/src/main/java
diff options
context:
space:
mode:
Diffstat (limited to 'app/src/main/java')
-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)