diff options
author | Harsh Shandilya <me@msfjarvis.dev> | 2023-05-05 00:30:53 +0530 |
---|---|---|
committer | Harsh Shandilya <me@msfjarvis.dev> | 2023-05-05 00:30:53 +0530 |
commit | def9786736cd1ae7ac887c696a0cb2aaf36aa79a (patch) | |
tree | 100c0328397dce3c171b6527595cd8ea2a34175b /app/src/main/java | |
parent | e11226949eed6a5220f369044b88dd9c9a446ac2 (diff) |
feat: switch default password generator to Diceware
Diffstat (limited to 'app/src/main/java')
-rw-r--r-- | app/src/main/java/app/passwordstore/ui/crypto/PasswordCreationActivity.kt | 2 | ||||
-rw-r--r-- | app/src/main/java/app/passwordstore/ui/settings/PasswordSettings.kt | 4 |
2 files changed, 2 insertions, 4 deletions
diff --git a/app/src/main/java/app/passwordstore/ui/crypto/PasswordCreationActivity.kt b/app/src/main/java/app/passwordstore/ui/crypto/PasswordCreationActivity.kt index 1d32151f..e7b04ade 100644 --- a/app/src/main/java/app/passwordstore/ui/crypto/PasswordCreationActivity.kt +++ b/app/src/main/java/app/passwordstore/ui/crypto/PasswordCreationActivity.kt @@ -285,7 +285,7 @@ class PasswordCreationActivity : BasePgpActivity() { binding.password.setText(bundle.getString(RESULT)) } } - when (settings.getString(PreferenceKeys.PREF_KEY_PWGEN_TYPE) ?: KEY_PWGEN_TYPE_CLASSIC) { + when (settings.getString(PreferenceKeys.PREF_KEY_PWGEN_TYPE) ?: KEY_PWGEN_TYPE_DICEWARE) { KEY_PWGEN_TYPE_CLASSIC -> PasswordGeneratorDialogFragment().show(supportFragmentManager, "generator") KEY_PWGEN_TYPE_DICEWARE -> diff --git a/app/src/main/java/app/passwordstore/ui/settings/PasswordSettings.kt b/app/src/main/java/app/passwordstore/ui/settings/PasswordSettings.kt index b192bc67..cb1643b0 100644 --- a/app/src/main/java/app/passwordstore/ui/settings/PasswordSettings.kt +++ b/app/src/main/java/app/passwordstore/ui/settings/PasswordSettings.kt @@ -11,7 +11,6 @@ import app.passwordstore.R import app.passwordstore.util.settings.PreferenceKeys import de.Maxr1998.modernpreferences.PreferenceScreen import de.Maxr1998.modernpreferences.helpers.editText -import de.Maxr1998.modernpreferences.helpers.onSelectionChange import de.Maxr1998.modernpreferences.helpers.singleChoice import de.Maxr1998.modernpreferences.helpers.switch import de.Maxr1998.modernpreferences.preferences.choice.SelectionItem @@ -27,9 +26,8 @@ class PasswordSettings(private val activity: FragmentActivity) : SettingsProvide PreferenceKeys.PREF_KEY_PWGEN_TYPE, items, ) { - initialSelection = "classic" + initialSelection = "diceware" titleRes = R.string.pref_password_generator_type_title - onSelectionChange { true } } editText(PreferenceKeys.GENERAL_SHOW_TIME) { titleRes = R.string.pref_clipboard_timeout_title |