Skip to content

Commit 5153178

Browse files
committed
Rename feature flag, to allow for separate flags for each password import promo
1 parent a5b7e49 commit 5153178

File tree

3 files changed

+3
-4
lines changed

3 files changed

+3
-4
lines changed

autofill/autofill-api/src/main/java/com/duckduckgo/autofill/api/AutofillFeature.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -153,5 +153,5 @@ interface AutofillFeature {
153153
fun createAsyncPreferences(): Toggle
154154

155155
@Toggle.DefaultValue(defaultValue = DefaultFeatureValue.INTERNAL)
156-
fun canPromoteImportPasswords(): Toggle
156+
fun canPromoteImportPasswordsInPasswordManagement(): Toggle
157157
}

autofill/autofill-impl/src/main/java/com/duckduckgo/autofill/impl/importing/promo/ImportInPasswordsVisibility.kt

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,6 @@ import dagger.SingleInstanceIn
2929
import javax.inject.Inject
3030
import kotlinx.coroutines.CoroutineScope
3131
import kotlinx.coroutines.Job
32-
import kotlinx.coroutines.flow.collect
3332
import kotlinx.coroutines.launch
3433
import logcat.logcat
3534

@@ -82,7 +81,7 @@ class RealImportInPasswordsVisibility @Inject constructor(
8281
}
8382

8483
private suspend fun evaluateIfUserCanShowImportPromo(): Boolean {
85-
if (autofillFeature.canPromoteImportPasswords().isEnabled().not()) return false
84+
if (autofillFeature.canPromoteImportPasswordsInPasswordManagement().isEnabled().not()) return false
8685

8786
if (internalAutofillStore.hasEverImportedPasswords || internalAutofillStore.hasDismissedImportedPasswordsPromo) return false
8887

autofill/autofill-impl/src/test/java/com/duckduckgo/autofill/impl/importing/promo/RealImportInPasswordsVisibilityTest.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -226,7 +226,7 @@ class RealImportInPasswordsVisibilityTest {
226226
whenever(autofillSelfToggle.isEnabled()).thenReturn(autofillSelfEnabled)
227227
whenever(canImportFromGooglePasswordManagerToggle.isEnabled()).thenReturn(canImportFromGooglePasswordManager)
228228

229-
whenever(autofillFeature.canPromoteImportPasswords()).thenReturn(canPromoteImportPasswordsToggle)
229+
whenever(autofillFeature.canPromoteImportPasswordsInPasswordManagement()).thenReturn(canPromoteImportPasswordsToggle)
230230
whenever(autofillFeature.self()).thenReturn(autofillSelfToggle)
231231
whenever(autofillFeature.canImportFromGooglePasswordManager()).thenReturn(canImportFromGooglePasswordManagerToggle)
232232
}

0 commit comments

Comments
 (0)