mirror of
https://github.com/bitwarden/android.git
synced 2026-05-10 05:49:44 -05:00
PM-19559 Remove "Give feedback" from Settings > About (#4924)
This commit is contained in:
@@ -65,10 +65,6 @@ fun AboutScreen(
|
||||
|
||||
AboutEvent.NavigateBack -> onNavigateBack.invoke()
|
||||
|
||||
AboutEvent.NavigateToFeedbackForm -> {
|
||||
intentManager.launchUri("https://livefrontinc.typeform.com/to/irgrRu4a".toUri())
|
||||
}
|
||||
|
||||
AboutEvent.NavigateToHelpCenter -> {
|
||||
intentManager.launchUri("https://bitwarden.com/help".toUri())
|
||||
}
|
||||
@@ -80,13 +76,6 @@ fun AboutScreen(
|
||||
AboutEvent.NavigateToLearnAboutOrganizations -> {
|
||||
intentManager.launchUri("https://bitwarden.com/help/about-organizations".toUri())
|
||||
}
|
||||
|
||||
AboutEvent.NavigateToRateApp -> {
|
||||
intentManager.launchUri(
|
||||
uri =
|
||||
"https://play.google.com/store/apps/details?id=com.x8bit.bitwarden".toUri(),
|
||||
)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -119,12 +108,6 @@ fun AboutScreen(
|
||||
onLearnAboutOrgsClick = remember(viewModel) {
|
||||
{ viewModel.trySendAction(AboutAction.LearnAboutOrganizationsClick) }
|
||||
},
|
||||
onRateTheAppClick = remember(viewModel) {
|
||||
{ viewModel.trySendAction(AboutAction.RateAppClick) }
|
||||
},
|
||||
onGiveFeedbackClick = remember(viewModel) {
|
||||
{ viewModel.trySendAction(AboutAction.GiveFeedbackClick) }
|
||||
},
|
||||
onSubmitCrashLogsCheckedChange = remember(viewModel) {
|
||||
{ viewModel.trySendAction(AboutAction.SubmitCrashLogsClick(it)) }
|
||||
},
|
||||
@@ -145,8 +128,6 @@ private fun ContentColumn(
|
||||
onHelpCenterClick: () -> Unit,
|
||||
onPrivacyPolicyClick: () -> Unit,
|
||||
onLearnAboutOrgsClick: () -> Unit,
|
||||
onRateTheAppClick: () -> Unit,
|
||||
onGiveFeedbackClick: () -> Unit,
|
||||
onSubmitCrashLogsCheckedChange: (Boolean) -> Unit,
|
||||
onVersionClick: () -> Unit,
|
||||
onWebVaultClick: () -> Unit,
|
||||
@@ -230,18 +211,6 @@ private fun ContentColumn(
|
||||
.fillMaxWidth()
|
||||
.testTag(tag = "LearnAboutOrganizationsRow"),
|
||||
)
|
||||
BitwardenExternalLinkRow(
|
||||
text = stringResource(R.string.give_feedback),
|
||||
onConfirmClick = onGiveFeedbackClick,
|
||||
dialogTitle = stringResource(R.string.continue_to_give_feedback),
|
||||
dialogMessage = stringResource(R.string.continue_to_provide_feedback),
|
||||
withDivider = false,
|
||||
cardStyle = CardStyle.Middle(),
|
||||
modifier = Modifier
|
||||
.standardHorizontalMargin()
|
||||
.fillMaxWidth()
|
||||
.testTag(tag = "GiveFeedbackRow"),
|
||||
)
|
||||
CopyRow(
|
||||
text = state.version,
|
||||
onClick = onVersionClick,
|
||||
|
||||
@@ -56,11 +56,9 @@ class AboutViewModel @Inject constructor(
|
||||
|
||||
override fun handleAction(action: AboutAction): Unit = when (action) {
|
||||
AboutAction.BackClick -> handleBackClick()
|
||||
AboutAction.GiveFeedbackClick -> handleGiveFeedbackClick()
|
||||
AboutAction.HelpCenterClick -> handleHelpCenterClick()
|
||||
AboutAction.PrivacyPolicyClick -> handlePrivacyPolicyClick()
|
||||
AboutAction.LearnAboutOrganizationsClick -> handleLearnAboutOrganizationsClick()
|
||||
AboutAction.RateAppClick -> handleRateAppClick()
|
||||
is AboutAction.SubmitCrashLogsClick -> handleSubmitCrashLogsClick(action)
|
||||
AboutAction.VersionClick -> handleVersionClick()
|
||||
AboutAction.WebVaultClick -> handleWebVaultClick()
|
||||
@@ -74,10 +72,6 @@ class AboutViewModel @Inject constructor(
|
||||
sendEvent(AboutEvent.NavigateToHelpCenter)
|
||||
}
|
||||
|
||||
private fun handleGiveFeedbackClick() {
|
||||
sendEvent(AboutEvent.NavigateToFeedbackForm)
|
||||
}
|
||||
|
||||
private fun handlePrivacyPolicyClick() {
|
||||
sendEvent(AboutEvent.NavigateToPrivacyPolicy)
|
||||
}
|
||||
@@ -86,10 +80,6 @@ class AboutViewModel @Inject constructor(
|
||||
sendEvent(AboutEvent.NavigateToLearnAboutOrganizations)
|
||||
}
|
||||
|
||||
private fun handleRateAppClick() {
|
||||
sendEvent(AboutEvent.NavigateToRateApp)
|
||||
}
|
||||
|
||||
private fun handleSubmitCrashLogsClick(action: AboutAction.SubmitCrashLogsClick) {
|
||||
logsManager.isEnabled = action.enabled
|
||||
mutableStateFlow.update { currentState ->
|
||||
@@ -139,11 +129,6 @@ sealed class AboutEvent {
|
||||
*/
|
||||
data object NavigateBack : AboutEvent()
|
||||
|
||||
/**
|
||||
* Navigate to the feedback form.
|
||||
*/
|
||||
data object NavigateToFeedbackForm : AboutEvent()
|
||||
|
||||
/**
|
||||
* Navigates to the help center.
|
||||
*/
|
||||
@@ -163,11 +148,6 @@ sealed class AboutEvent {
|
||||
* Navigates to the web vault.
|
||||
*/
|
||||
data class NavigateToWebVault(val vaultUrl: String) : AboutEvent()
|
||||
|
||||
/**
|
||||
* Navigates to rate the app.
|
||||
*/
|
||||
data object NavigateToRateApp : AboutEvent()
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -179,11 +159,6 @@ sealed class AboutAction {
|
||||
*/
|
||||
data object BackClick : AboutAction()
|
||||
|
||||
/**
|
||||
* User clicked the give feedback row.
|
||||
*/
|
||||
data object GiveFeedbackClick : AboutAction()
|
||||
|
||||
/**
|
||||
* User clicked the helper center row.
|
||||
*/
|
||||
@@ -199,11 +174,6 @@ sealed class AboutAction {
|
||||
*/
|
||||
data object LearnAboutOrganizationsClick : AboutAction()
|
||||
|
||||
/**
|
||||
* User clicked the rate the app row.
|
||||
*/
|
||||
data object RateAppClick : AboutAction()
|
||||
|
||||
/**
|
||||
* User clicked the submit crash logs toggle.
|
||||
*/
|
||||
|
||||
@@ -975,10 +975,7 @@ Do you want to switch to this account?</string>
|
||||
<string name="passkey_operation_failed_because_app_not_found_in_asset_links">Passkey operation failed because app not found in asset links</string>
|
||||
<string name="passkey_operation_failed_because_app_could_not_be_verified">Passkey operation failed because app could not be verified</string>
|
||||
<string name="confirm_file_password">Confirm file password</string>
|
||||
<string name="continue_to_give_feedback">Continue to Give Feedback?</string>
|
||||
<string name="continue_to_provide_feedback">Select continue to give feedback on the new app!</string>
|
||||
<string name="file_password">File password</string>
|
||||
<string name="give_feedback">Give Feedback</string>
|
||||
<string name="password_protected">Password Protected</string>
|
||||
<string name="password_used_to_export">This password will be used to export and import this file</string>
|
||||
<string name="autofill_suggestion">Autofill suggestion</string>
|
||||
|
||||
@@ -75,22 +75,6 @@ class AboutScreenTest : BaseComposeTest() {
|
||||
verify { viewModel.trySendAction(AboutAction.BackClick) }
|
||||
}
|
||||
|
||||
@Suppress("MaxLineLength")
|
||||
@Test
|
||||
fun `on give feedback click should display confirmation dialog and confirm click should emit GiveFeedbackClick`() {
|
||||
composeTestRule.onNode(isDialog()).assertDoesNotExist()
|
||||
composeTestRule.onNodeWithText("Give Feedback").performScrollTo().performClick()
|
||||
composeTestRule.onNode(isDialog()).assertExists()
|
||||
composeTestRule
|
||||
.onAllNodesWithText("Continue")
|
||||
.filterToOne(hasAnyAncestor(isDialog()))
|
||||
.performClick()
|
||||
composeTestRule.onNode(isDialog()).assertDoesNotExist()
|
||||
verify {
|
||||
viewModel.trySendAction(AboutAction.GiveFeedbackClick)
|
||||
}
|
||||
}
|
||||
|
||||
@Suppress("MaxLineLength")
|
||||
@Test
|
||||
fun `on bitwarden help center click should display confirmation dialog and confirm click should emit HelpCenterClick`() {
|
||||
@@ -194,16 +178,6 @@ class AboutScreenTest : BaseComposeTest() {
|
||||
}
|
||||
}
|
||||
|
||||
@Test
|
||||
fun `on NavigateToAboutSend should call launchUri on intentManager`() {
|
||||
mutableEventFlow.tryEmit(AboutEvent.NavigateToRateApp)
|
||||
verify {
|
||||
intentManager.launchUri(
|
||||
"https://play.google.com/store/apps/details?id=com.x8bit.bitwarden".toUri(),
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
@Test
|
||||
fun `submit crash logs switch should be displayed according to state`() {
|
||||
mutableStateFlow.update { it.copy(shouldShowCrashLogsButton = true) }
|
||||
|
||||
@@ -43,15 +43,6 @@ class AboutViewModelTest : BaseViewModelTest() {
|
||||
}
|
||||
}
|
||||
|
||||
@Test
|
||||
fun `on GiveFeedbackClick should emit NavigateToFeedbackForm`() = runTest {
|
||||
val viewModel = createViewModel()
|
||||
viewModel.eventFlow.test {
|
||||
viewModel.trySendAction(AboutAction.GiveFeedbackClick)
|
||||
assertEquals(AboutEvent.NavigateToFeedbackForm, awaitItem())
|
||||
}
|
||||
}
|
||||
|
||||
@Test
|
||||
fun `on HelpCenterClick should emit NavigateToHelpCenter`() = runTest {
|
||||
val viewModel = createViewModel(DEFAULT_ABOUT_STATE)
|
||||
@@ -80,15 +71,6 @@ class AboutViewModelTest : BaseViewModelTest() {
|
||||
}
|
||||
}
|
||||
|
||||
@Test
|
||||
fun `on RateAppClick should emit NavigateToRateApp`() = runTest {
|
||||
val viewModel = createViewModel(DEFAULT_ABOUT_STATE)
|
||||
viewModel.eventFlow.test {
|
||||
viewModel.trySendAction(AboutAction.RateAppClick)
|
||||
assertEquals(AboutEvent.NavigateToRateApp, awaitItem())
|
||||
}
|
||||
}
|
||||
|
||||
@Test
|
||||
fun `on SubmitCrashLogsClick should update isSubmitCrashLogsEnabled to true`() = runTest {
|
||||
val viewModel = createViewModel(DEFAULT_ABOUT_STATE)
|
||||
|
||||
Reference in New Issue
Block a user