Merge pull request #1263 from tanja3981/bugfix/issue1187

Update preference value even new value is empty (deleted).
This commit is contained in:
Milos Kozak 2018-07-26 08:21:08 +02:00 committed by GitHub
commit a812eddda2
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -86,7 +86,7 @@ public class PreferencesActivity extends PreferenceActivity implements SharedPre
pref.setSummary("******");
} else if (pref.getKey().equals(MainApp.gs(R.string.key_danars_name))) {
pref.setSummary(SP.getString(R.string.key_danars_name, ""));
} else if (editTextPref.getText() != null && !editTextPref.getText().equals("")) {
} else if (editTextPref.getText() != null ) {
((EditTextPreference) pref).setDialogMessage(editTextPref.getDialogMessage());
pref.setSummary(editTextPref.getText());
} else if (pref.getKey().contains("smscommunicator_allowednumbers") && TextUtils.isEmpty(editTextPref.getText().trim())) {