Skip to content

Add dev setting for clearing previous google import flag #6311

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

Merged
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 @@ -316,6 +316,17 @@ class AutofillInternalSettingsActivity : DuckDuckGoActivity() {
}
importCsvLauncher.launch(intent)
}

binding.importPasswordsResetImportedFlagButton.setClickListener {
lifecycleScope.launch(dispatchers.io()) {
autofillStore.hasEverImportedPasswords = false
}
Toast.makeText(
this@AutofillInternalSettingsActivity,
getString(R.string.autofillDevSettingsResetGooglePasswordsImportFlagConfirmation),
Toast.LENGTH_SHORT,
).show()
}
}

private fun configureEngagementEventHandlers() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -124,6 +124,12 @@
android:layout_height="wrap_content"
app:primaryText="@string/autofillDevSettingsImportPasswordsImportPasswordsCsvTitle" />

<com.duckduckgo.common.ui.view.listitem.TwoLineListItem
android:id="@+id/importPasswordsResetImportedFlagButton"
android:layout_width="match_parent"
android:layout_height="wrap_content"
app:primaryText="@string/autofillDevSettingsResetGooglePasswordsImportFlagTitle"
app:secondaryText="@string/autofillDevSettingsResetGooglePasswordsImportFlagInstruction" />

<com.duckduckgo.common.ui.view.divider.HorizontalDivider
android:layout_width="match_parent"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,9 @@
<string name="autofillDevSettingsImportPasswordsExportPasswordsImportFlowTitle">Launch Google Passwords (import flow)</string>
<string name="autofillDevSettingsImportPasswordsImportPasswordsCsvTitle">Import CSV</string>
<string name="autofillDevSettingsImportGooglePasswordsSuccessMessage" instruction="Placeholder is the number of passwords we were able to import">%1$d passwords imported from Google</string>
<string name="autofillDevSettingsResetGooglePasswordsImportFlagTitle">Previous Google Imports</string>
<string name="autofillDevSettingsResetGooglePasswordsImportFlagInstruction">Tap to forget previous imports</string>
<string name="autofillDevSettingsResetGooglePasswordsImportFlagConfirmation">Eligible to see Google Import promos again</string>

<string name="autofillDevSettingsOverrideMaxInstallDialogTitle">Maximum number of days since install</string>
<string name="autofillDevSettingsOverrideMaxInstallDialogOkButtonText">OK</string>
Expand Down
Loading