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 | |
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')
4 files changed, 12 insertions, 13 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( diff --git a/app/src/main/res/layout/fragment_dashboard.xml b/app/src/main/res/layout/fragment_dashboard.xml index 3197257..66c738c 100644 --- a/app/src/main/res/layout/fragment_dashboard.xml +++ b/app/src/main/res/layout/fragment_dashboard.xml @@ -214,7 +214,6 @@ android:text="@string/dashboard_state_ipaddress_off" android:layout_height="88dp" app:icon="@{@drawable/ic_tracked}" app:title="@{@string/dashboard_am_i_tracked_title}" - app:subTitle='@{@string/trackers_title}' /> <View android:layout_width="match_parent" @@ -230,7 +229,6 @@ android:text="@string/dashboard_state_ipaddress_off" android:layout_height="88dp" app:icon="@{@drawable/ic_apps_permissions}" app:title="@{@string/dashboard_apps_permissions_title}" - app:subTitle='@{@string/dashboard_apps_permissions_subtitle}' /> <View android:layout_width="match_parent" diff --git a/app/src/main/res/values/strings.xml b/app/src/main/res/values/strings.xml index fe92d6d..f484dd7 100644 --- a/app/src/main/res/values/strings.xml +++ b/app/src/main/res/values/strings.xml @@ -26,7 +26,8 @@ <string name="dashboard_apps_permissions_subtitle">Manage your permissions</string> <string name="dashboard_location_title">Geolocation mode</string> <string name="dashboard_location_subtitle_off">Real geolocation</string> - <string name="dashboard_location_subtitle_on">Fake geolocation</string> + <string name="dashboard_location_subtitle_specific">Specific fake geolocation</string> + <string name="dashboard_location_subtitle_random">Random fake geolocation</string> <string name="dashboard_internet_activity_privacy_title">My internet activity privacy</string> <string name="dashboard_internet_activity_privacy_subtitle_off">Real IP address exposed</string> <string name="dashboard_internet_activity_privacy_subtitle_on">Real IP address hidden</string> |