aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMohamed Zenadi <mohamed@zenadi.com>2015-06-07 13:47:42 +0200
committerMohamed Zenadi <mohamed@zenadi.com>2015-06-07 14:33:02 +0200
commit2022cf3d6ef874ef08bb1199f90d15e732613b61 (patch)
treeb9a2a12630b5693e0c790d903e5fe24ab533ddd2
parent85d4ca3f965e558cc3fa7eb0a8de41cc2c7f0e72 (diff)
fix provider list preference not saving correctly
-rw-r--r--app/src/main/java/com/zeapo/pwdstore/UserPreference.java13
1 files changed, 5 insertions, 8 deletions
diff --git a/app/src/main/java/com/zeapo/pwdstore/UserPreference.java b/app/src/main/java/com/zeapo/pwdstore/UserPreference.java
index 4c6ad4f5..80cafad8 100644
--- a/app/src/main/java/com/zeapo/pwdstore/UserPreference.java
+++ b/app/src/main/java/com/zeapo/pwdstore/UserPreference.java
@@ -109,7 +109,7 @@ public class UserPreference extends AppCompatActivity {
findPreference("openpgp_provider_list").setOnPreferenceChangeListener((preference, o) -> {
callingActivity.mKey.setOpenPgpProvider((String) o);
- return false;
+ return true;
});
final Preference externalRepo = findPreference("pref_select_external");
@@ -119,13 +119,10 @@ public class UserPreference extends AppCompatActivity {
return true;
});
- Preference.OnPreferenceChangeListener resetRepo = new Preference.OnPreferenceChangeListener() {
- @Override
- public boolean onPreferenceChange(Preference preference, Object o) {
- PasswordRepository.closeRepository();
- getPreferenceManager().getSharedPreferences().edit().putBoolean("repo_changed", true).apply();
- return true;
- }
+ Preference.OnPreferenceChangeListener resetRepo = (preference, o) -> {
+ PasswordRepository.closeRepository();
+ getPreferenceManager().getSharedPreferences().edit().putBoolean("repo_changed", true).apply();
+ return true;
};
findPreference("pref_select_external").setOnPreferenceChangeListener(resetRepo);