From c5c030693c40c912881feb5ecca5913a83a4bb55 Mon Sep 17 00:00:00 2001 From: Amit Kumar Date: Wed, 16 Jun 2021 21:36:37 +0530 Subject: Add descriptive name to dummy trackers --- .../foundation/e/privacycentralapp/dummy/TrackersDataSource.kt | 10 +++++----- .../e/privacycentralapp/features/trackers/TrackersFeature.kt | 7 +++++-- 2 files changed, 10 insertions(+), 7 deletions(-) (limited to 'app/src/main') diff --git a/app/src/main/java/foundation/e/privacycentralapp/dummy/TrackersDataSource.kt b/app/src/main/java/foundation/e/privacycentralapp/dummy/TrackersDataSource.kt index 07822bb..13def5a 100644 --- a/app/src/main/java/foundation/e/privacycentralapp/dummy/TrackersDataSource.kt +++ b/app/src/main/java/foundation/e/privacycentralapp/dummy/TrackersDataSource.kt @@ -43,19 +43,19 @@ object TrackersDataSource { val youtube = TrackedApp("Youtube", true, R.drawable.ic_facebook) val crashlytics = Tracker( - "Google Crashlytics (Demo)", + "Google Crashlytics Demo (google.com) ", domain = "google.com", trackedApps = listOf(facebook, firefox) ) val facebookAds = Tracker( - "Facebook (Demo)", - domain = "google.com", + "Facebook IP Demo", + domain = "157.240.16.35", trackedApps = listOf(facebook, whatsapp) ) val rubiconTracker = Tracker( - "Rubicon Projects", - domain = "google.com", + "Rubicon Projects (block google)", + domain = "google", trackedApps = listOf(google, blisslauncher, youtube) ) val googleAnalytics = Tracker( diff --git a/app/src/main/java/foundation/e/privacycentralapp/features/trackers/TrackersFeature.kt b/app/src/main/java/foundation/e/privacycentralapp/features/trackers/TrackersFeature.kt index 4a08328..ec7b67a 100644 --- a/app/src/main/java/foundation/e/privacycentralapp/features/trackers/TrackersFeature.kt +++ b/app/src/main/java/foundation/e/privacycentralapp/features/trackers/TrackersFeature.kt @@ -80,7 +80,10 @@ class TrackersFeature( is Effect.TrackersLoadedEffect -> State(effect.trackers) is Effect.TrackerSelectedEffect -> state.copy(currentSelectedTracker = effect.tracker) is Effect.ErrorEffect -> state - is Effect.TrackerToggleEffect -> state + is Effect.TrackerToggleEffect -> { + Log.d("Tracker effect", "$state") + state + } } }, actor = { state, action -> @@ -99,7 +102,7 @@ class TrackersFeature( is Action.ToggleTrackerAction -> { if (state.currentSelectedTracker != null) { val result = TrackersDataSource.toggleTracker( - state.currentSelectedTracker, + action.tracker, action.grant ) flowOf(Effect.TrackerToggleEffect(result)) -- cgit v1.2.1