From bf4ef082cdfce89cc1ce5027b1f70b96b0deac37 Mon Sep 17 00:00:00 2001 From: jacquarg Date: Fri, 4 Feb 2022 08:32:11 +0100 Subject: i4583 fix subtitles wordings on main screen. --- .../features/dashboard/DashboardFeature.kt | 4 ++-- .../features/dashboard/DashboardFragment.kt | 16 ++++++++-------- 2 files changed, 10 insertions(+), 10 deletions(-) (limited to 'app/src/main/java/foundation') 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? = 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( -- cgit v1.2.1