summaryrefslogtreecommitdiff
path: root/app/src/main/java/foundation/e/privacycentralapp
diff options
context:
space:
mode:
Diffstat (limited to 'app/src/main/java/foundation/e/privacycentralapp')
-rw-r--r--app/src/main/java/foundation/e/privacycentralapp/domain/usecases/GetQuickPrivacyStateUseCase.kt5
-rw-r--r--app/src/main/java/foundation/e/privacycentralapp/features/location/FakeLocationFeature.kt3
-rw-r--r--app/src/main/java/foundation/e/privacycentralapp/features/location/FakeLocationFragment.kt17
3 files changed, 3 insertions, 22 deletions
diff --git a/app/src/main/java/foundation/e/privacycentralapp/domain/usecases/GetQuickPrivacyStateUseCase.kt b/app/src/main/java/foundation/e/privacycentralapp/domain/usecases/GetQuickPrivacyStateUseCase.kt
index 6e2e7cf..36599cb 100644
--- a/app/src/main/java/foundation/e/privacycentralapp/domain/usecases/GetQuickPrivacyStateUseCase.kt
+++ b/app/src/main/java/foundation/e/privacycentralapp/domain/usecases/GetQuickPrivacyStateUseCase.kt
@@ -41,7 +41,6 @@ class GetQuickPrivacyStateUseCase(
}
val quickPrivacyEnabledFlow = localStateRepository.quickPrivacyEnabledFlow
- val isQuickPrivacyEnabled get() = localStateRepository.isQuickPrivacyEnabled
val quickPrivacyState = combine(
localStateRepository.quickPrivacyEnabledFlow,
@@ -95,10 +94,6 @@ class GetQuickPrivacyStateUseCase(
val showQuickPrivacyDisabledMessage: StateFlow<Boolean> = localStateRepository.showQuickPrivacyDisabledMessage
- // fun setQuickPrivacyDisabledMessage() {
- // localStateRepository.setShowQuickPrivacyDisabledMessage(true)
- // }
-
fun resetQuickPrivacyDisabledMessage() {
localStateRepository.setShowQuickPrivacyDisabledMessage(false)
}
diff --git a/app/src/main/java/foundation/e/privacycentralapp/features/location/FakeLocationFeature.kt b/app/src/main/java/foundation/e/privacycentralapp/features/location/FakeLocationFeature.kt
index 6ca93d3..85a507d 100644
--- a/app/src/main/java/foundation/e/privacycentralapp/features/location/FakeLocationFeature.kt
+++ b/app/src/main/java/foundation/e/privacycentralapp/features/location/FakeLocationFeature.kt
@@ -47,7 +47,6 @@ class FakeLocationFeature(
singleEventProducer
) {
data class State(
- val isEnabled: Boolean = true,
val mode: LocationMode = LocationMode.REAL_LOCATION,
val currentLocation: Location? = null,
val specificLatitude: Float? = null,
@@ -74,7 +73,6 @@ class FakeLocationFeature(
}
sealed class Effect {
- data class QuickPrivacyUpdatedEffect(val isEnabled: Boolean) : Effect()
data class LocationModeUpdatedEffect(
val mode: LocationMode,
val latitude: Float? = null,
@@ -110,7 +108,6 @@ class FakeLocationFeature(
is Action.Init -> {
fakeLocationStateUseCase.startListeningLocation()
merge(
- getQuickPrivacyStateUseCase.quickPrivacyEnabledFlow.map { Effect.QuickPrivacyUpdatedEffect(it) },
fakeLocationStateUseCase.configuredLocationMode.map { (mode, lat, lon) ->
Effect.LocationModeUpdatedEffect(mode = mode, latitude = lat, longitude = lon)
},
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 2999eb6..fa26dd0 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
@@ -22,7 +22,6 @@ import android.content.Context
import android.location.Location
import android.os.Bundle
import android.text.Editable
-import android.util.Log
import android.view.View
import android.widget.Toast
import androidx.annotation.NonNull
@@ -235,20 +234,11 @@ class FakeLocationFragment :
if (state.showQuickPrivacyDisabledMessage) qpDisabledSnackbar?.show()
else qpDisabledSnackbar?.dismiss()
- binding.radioUseRandomLocation.apply {
- isChecked = state.mode == LocationMode.RANDOM_LOCATION
- isEnabled = state.isEnabled
- }
+ binding.radioUseRandomLocation.isChecked = state.mode == LocationMode.RANDOM_LOCATION
- binding.radioUseSpecificLocation.apply {
- isChecked = state.mode == LocationMode.SPECIFIC_LOCATION
- isEnabled = state.isEnabled
- }
+ binding.radioUseSpecificLocation.isChecked = state.mode == LocationMode.SPECIFIC_LOCATION
- binding.radioUseRealLocation.apply {
- isChecked = state.mode == LocationMode.REAL_LOCATION
- isEnabled = state.isEnabled
- }
+ binding.radioUseRealLocation.isChecked = state.mode == LocationMode.REAL_LOCATION
binding.mapView.isEnabled = (state.mode == LocationMode.SPECIFIC_LOCATION)
@@ -259,7 +249,6 @@ class FakeLocationFragment :
binding.mapOverlay.isVisible = state.mode != LocationMode.SPECIFIC_LOCATION
binding.centeredMarker.isVisible = true
- Log.d("LocationTest", "is mapboxMap null: ${mapboxMap == null}")
mapboxMap?.moveCamera(
CameraUpdateFactory.newLatLng(
LatLng(