Commit 0839c49d authored by Daniel Wolf's avatar Daniel Wolf
Browse files

Don't save when an empty pin is selected, disable the pin then

parent 58cf7d97
......@@ -417,8 +417,12 @@ public class SettingsFragment extends PreferenceFragmentCompat implements Search
findPreference("pin_value").setOnPreferenceChangeListener(new Preference.OnPreferenceChangeListener() {
@Override
public boolean onPreferenceChange(Preference preference, Object newValue) {
awaitingPinChange = false;
preferences.put("pin_value", "" + newValue);
if(newValue.toString().equals("")){
findPreference("setting_pin_enabled").setEnabled(false);
}else {
awaitingPinChange = false;
preferences.put("pin_value",String.valueOf(newValue));
}
return false;
}
});
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment