mirror of
https://github.com/bitwarden/android.git
synced 2026-06-03 11:16:40 -05:00
BIT-1962: Add Direct Link to Privacy Policy in About Screen (#1084)
This commit is contained in:
committed by
Álison Fernandes
parent
fc17370223
commit
bd84a8649d
@@ -75,6 +75,10 @@ fun AboutScreen(
|
||||
intentManager.launchUri("https://bitwarden.com/help".toUri())
|
||||
}
|
||||
|
||||
AboutEvent.NavigateToPrivacyPolicy -> {
|
||||
intentManager.launchUri("https://bitwarden.com/privacy".toUri())
|
||||
}
|
||||
|
||||
AboutEvent.NavigateToLearnAboutOrganizations -> {
|
||||
intentManager.launchUri("https://bitwarden.com/help/about-organizations".toUri())
|
||||
}
|
||||
@@ -113,6 +117,9 @@ fun AboutScreen(
|
||||
onHelpCenterClick = remember(viewModel) {
|
||||
{ viewModel.trySendAction(AboutAction.HelpCenterClick) }
|
||||
},
|
||||
onPrivacyPolicyClick = remember(viewModel) {
|
||||
{ viewModel.trySendAction(AboutAction.PrivacyPolicyClick) }
|
||||
},
|
||||
onLearnAboutOrgsClick = remember(viewModel) {
|
||||
{ viewModel.trySendAction(AboutAction.LearnAboutOrganizationsClick) }
|
||||
},
|
||||
@@ -137,6 +144,7 @@ fun AboutScreen(
|
||||
private fun ContentColumn(
|
||||
state: AboutState,
|
||||
onHelpCenterClick: () -> Unit,
|
||||
onPrivacyPolicyClick: () -> Unit,
|
||||
onLearnAboutOrgsClick: () -> Unit,
|
||||
onRateTheAppClick: () -> Unit,
|
||||
onSubmitCrashLogsCheckedChange: (Boolean) -> Unit,
|
||||
@@ -170,6 +178,14 @@ private fun ContentColumn(
|
||||
id = R.string.learn_more_about_how_to_use_bitwarden_on_the_help_center,
|
||||
),
|
||||
)
|
||||
BitwardenExternalLinkRow(
|
||||
text = stringResource(id = R.string.privacy_policy),
|
||||
onConfirmClick = onPrivacyPolicyClick,
|
||||
dialogTitle = stringResource(id = R.string.continue_to_privacy_policy),
|
||||
dialogMessage = stringResource(
|
||||
id = R.string.privacy_policy_description_long,
|
||||
),
|
||||
)
|
||||
BitwardenExternalLinkRow(
|
||||
text = stringResource(id = R.string.web_vault),
|
||||
onConfirmClick = onWebVaultClick,
|
||||
|
||||
@@ -50,6 +50,7 @@ class AboutViewModel @Inject constructor(
|
||||
override fun handleAction(action: AboutAction): Unit = when (action) {
|
||||
AboutAction.BackClick -> handleBackClick()
|
||||
AboutAction.HelpCenterClick -> handleHelpCenterClick()
|
||||
AboutAction.PrivacyPolicyClick -> handlePrivacyPolicyClick()
|
||||
AboutAction.LearnAboutOrganizationsClick -> handleLearnAboutOrganizationsClick()
|
||||
AboutAction.RateAppClick -> handleRateAppClick()
|
||||
is AboutAction.SubmitCrashLogsClick -> handleSubmitCrashLogsClick(action)
|
||||
@@ -65,6 +66,10 @@ class AboutViewModel @Inject constructor(
|
||||
sendEvent(AboutEvent.NavigateToHelpCenter)
|
||||
}
|
||||
|
||||
private fun handlePrivacyPolicyClick() {
|
||||
sendEvent(AboutEvent.NavigateToPrivacyPolicy)
|
||||
}
|
||||
|
||||
private fun handleLearnAboutOrganizationsClick() {
|
||||
sendEvent(AboutEvent.NavigateToLearnAboutOrganizations)
|
||||
}
|
||||
@@ -139,6 +144,11 @@ sealed class AboutEvent {
|
||||
*/
|
||||
data object NavigateToHelpCenter : AboutEvent()
|
||||
|
||||
/**
|
||||
* Navigates to the private policy.
|
||||
*/
|
||||
data object NavigateToPrivacyPolicy : AboutEvent()
|
||||
|
||||
/**
|
||||
* Navigates to learn about organizations.
|
||||
*/
|
||||
@@ -169,6 +179,11 @@ sealed class AboutAction {
|
||||
*/
|
||||
data object HelpCenterClick : AboutAction()
|
||||
|
||||
/**
|
||||
* User clicked the privacy policy row.
|
||||
*/
|
||||
data object PrivacyPolicyClick : AboutAction()
|
||||
|
||||
/**
|
||||
* User clicked the learn about organizations row.
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user