diff options
author | Guillaume Jacquart <guillaume.jacquart@hoodbrains.com> | 2022-02-04 17:18:49 +0000 |
---|---|---|
committer | Guillaume Jacquart <guillaume.jacquart@hoodbrains.com> | 2022-02-04 17:18:49 +0000 |
commit | 58bf2b3ca3e06b27edf00ac86826482400d9e556 (patch) | |
tree | 3e756ca35eafa874d7066266b1fa1690b6e49035 /app/src/main/java/foundation/e/privacycentralapp | |
parent | 82b792e6680b9906261f0eb53accff13ac6872ad (diff) | |
parent | bf4ef082cdfce89cc1ce5027b1f70b96b0deac37 (diff) |
Merge branch 'feature/4583_subtitle_status' into 'main'
#4583 fix subtitles wordings on main screen.
See merge request e/privacy-central/privacycentralapp!13
Diffstat (limited to 'app/src/main/java/foundation/e/privacycentralapp')
-rw-r--r-- | app/src/main/java/foundation/e/privacycentralapp/features/dashboard/DashboardFeature.kt | 4 | ||||
-rw-r--r-- | app/src/main/java/foundation/e/privacycentralapp/features/dashboard/DashboardFragment.kt | 16 |
2 files changed, 10 insertions, 10 deletions
diff --git a/app/src/main/java/foundation/e/privacycentralapp/features/dashboard/DashboardFeature.kt b/app/src/main/java/foundation/e/privacycentralapp/features/dashboard/DashboardFeature.kt index b25e9ed..c1d6559 100644 --- a/app/src/main/java/foundation/e/privacycentralapp/features/dashboard/DashboardFeature.kt +++ b/app/src/main/java/foundation/e/privacycentralapp/features/dashboard/DashboardFeature.kt @@ -57,7 +57,7 @@ class DashboardFeature( val totalGraph: Int? = null, // val graphData val trackersCount: Int? = null, - val dayTrackersCount: Int? = null, + val activeTrackersCount: Int? = null, val dayStatistics: List<Int>? = null ) @@ -112,7 +112,7 @@ class DashboardFeature( is Effect.IpScramblingModeUpdatedEffect -> state.copy(internetPrivacyMode = effect.mode) is Effect.TrackersStatisticsUpdatedEffect -> state.copy( dayStatistics = effect.dayStatistics, - dayTrackersCount = effect.dayTrackersCount, + activeTrackersCount = effect.dayTrackersCount, trackersCount = effect.trackersCount ) diff --git a/app/src/main/java/foundation/e/privacycentralapp/features/dashboard/DashboardFragment.kt b/app/src/main/java/foundation/e/privacycentralapp/features/dashboard/DashboardFragment.kt index ae7bbf0..60cef54 100644 --- a/app/src/main/java/foundation/e/privacycentralapp/features/dashboard/DashboardFragment.kt +++ b/app/src/main/java/foundation/e/privacycentralapp/features/dashboard/DashboardFragment.kt @@ -201,20 +201,20 @@ class DashboardFragment : updateGraphData(it, binding.graph, getColor(requireContext(), R.color.e_blue2)) } - binding.graphLegend.text = getString(R.string.dashboard_graph_trackers_legend, state.dayTrackersCount?.toString() ?: "No") + binding.graphLegend.text = getString(R.string.dashboard_graph_trackers_legend, state.activeTrackersCount?.toString() ?: "No") - if (state.dayTrackersCount != null && state.trackersCount != null) { - binding.amITracked.subTitle = getString(R.string.dashboard_am_i_tracked_subtitle, state.trackersCount, state.dayTrackersCount) + if (state.activeTrackersCount != null && state.trackersCount != null) { + binding.amITracked.subTitle = getString(R.string.dashboard_am_i_tracked_subtitle, state.trackersCount, state.activeTrackersCount) } else { binding.amITracked.subTitle = getString(R.string.trackers_title) } binding.myLocation.subTitle = getString( - if (state.isQuickPrivacyEnabled && - state.locationMode != LocationMode.REAL_LOCATION - ) - R.string.dashboard_location_subtitle_on - else R.string.dashboard_location_subtitle_off + when (state.locationMode) { + LocationMode.REAL_LOCATION -> R.string.dashboard_location_subtitle_off + LocationMode.SPECIFIC_LOCATION -> R.string.dashboard_location_subtitle_specific + LocationMode.RANDOM_LOCATION -> R.string.dashboard_location_subtitle_random + } ) binding.internetActivityPrivacy.subTitle = getString( |