summaryrefslogtreecommitdiff
path: root/app/src/main/java/foundation/e/privacycentralapp
diff options
context:
space:
mode:
authorjacquarg <guillaume.jacquart@hoodbrains.com>2022-02-04 08:32:11 +0100
committerjacquarg <guillaume.jacquart@hoodbrains.com>2022-02-04 09:12:24 +0100
commitbf4ef082cdfce89cc1ce5027b1f70b96b0deac37 (patch)
tree3e756ca35eafa874d7066266b1fa1690b6e49035 /app/src/main/java/foundation/e/privacycentralapp
parent82b792e6680b9906261f0eb53accff13ac6872ad (diff)
i4583 fix subtitles wordings on main screen.
Diffstat (limited to 'app/src/main/java/foundation/e/privacycentralapp')
-rw-r--r--app/src/main/java/foundation/e/privacycentralapp/features/dashboard/DashboardFeature.kt4
-rw-r--r--app/src/main/java/foundation/e/privacycentralapp/features/dashboard/DashboardFragment.kt16
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(