Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: Improve Analytics dialog (WPB-10601) #3336

Merged
merged 5 commits into from
Aug 19, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -44,14 +44,14 @@ class AnalyticsUsageViewModel @Inject constructor(
val isDialogSeen = dataStore.isAnalyticsDialogSeen().first()
val isAnalyticsUsageEnabled = dataStore.isAnonymousUsageDataEnabled().first()
val isAnalyticsConfigurationEnabled = analyticsEnabled is AnalyticsConfiguration.Enabled
val isProdBackend = when (val serverConfig = selfServerConfig()) {
val isValidBackend = when (val serverConfig = selfServerConfig()) {
is SelfServerConfigUseCase.Result.Success ->
serverConfig.serverLinks.links.api == ServerConfig.PRODUCTION.api
|| serverConfig.serverLinks.links.api == ServerConfig.STAGING.api
is SelfServerConfigUseCase.Result.Failure -> false
}

val shouldShowDialog = isProdBackend && !isAnalyticsUsageEnabled && isAnalyticsConfigurationEnabled && !isDialogSeen
val shouldShowDialog = isValidBackend && !isAnalyticsUsageEnabled && isAnalyticsConfigurationEnabled && !isDialogSeen

state = state.copy(
shouldDisplayDialog = shouldShowDialog
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ fun AnalyticsUsageDialog(
type = WireDialogButtonType.Secondary
),
buttonsHorizontalAlignment = false,
onDismiss = declineOption
onDismiss = {}
)
}

Expand Down
4 changes: 2 additions & 2 deletions app/src/main/res/values/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -1012,7 +1012,7 @@ In group conversations, the group admin can overwrite this setting.</string>
<string name="settings_show_typing_indicator_description">When this is on, you see when other people are writing a message, and others notice when you are typing. This setting applies to all conversations on this device.</string>
<string name="settings_app_lock_title">Lock with passcode</string>
<string name="settings_send_anonymous_usage_data_title">Send anonymous usage data</string>
<string name="settings_send_anonymous_usage_data_description">Usage data allows Wire to understand how the app is being used and how it can be improved. The data is anonymous and does not include the content of your communications (such as messages, files, locations, or calls).</string>
<string name="settings_send_anonymous_usage_data_description">Help to improve the app by sharing usage data with Wire. The data is anonymous and doesn\'t include any content of your communication (such as messages, files, location, or calls).</string>
<!--Privacy Settings, App lock -->
<string name="settings_set_lock_screen_title">Set app lock passcode</string>
<string name="settings_set_lock_screen_description">The app will lock itself after %1$s of inactivity. To unlock the app you need to enter this passcode or use biometric authentication.\n\nMake sure to remember this passcode as there is no way to recover it.</string>
Expand Down Expand Up @@ -1164,7 +1164,7 @@ In group conversations, the group admin can overwrite this setting.</string>
<string name="cancel_login_dialog_title">Are you sure you want to cancel?</string>
<!-- Analytics Usage dialog -->
<string name="analytics_usage_dialog_title">Consent to share user data</string>
<string name="analytics_usage_dialog_text">Help to improve Wire by sharing your usage data via a pseudonymous ID.\n\nThe data is neither linked to your personal information nor shared with third parties besides Zeta Project Germany GmbH. It includes, for example, when you use a feature, your app version, device type, or your operating system. The ID will be deleted at the latest from your device after [28] days after the last activity.\n\nFind further details in our Privacy Policy (link). You can revoke your consent at any time.</string>
<string name="analytics_usage_dialog_text">Help to improve Wire by sharing your usage data via a pseudonymous ID. The data is neither linked to your personal information nor shared with third parties besides Zeta Project Germany GmbH. It includes, for example, when you use a feature, your app version, device type, or your operating system. The ID will be deleted at the latest from your device after 365 days after the last activity.Find further details in our\n\nPrivacy Policy (link). You can revoke your consent at any time.</string>
<string name="analytics_usage_dialog_button_agree">Agree</string>
<string name="analytics_usage_dialog_button_decline">Decline</string>
<string name="analytics_usage_dialog_button_privacy_policy">Privacy Policy</string>
Expand Down
Loading