mirror of
https://github.com/rhasspy/espeak-ng.git
synced 2026-10-31 05:35:35 +00:00
SeekBarPreference: only commit the preference if requested to.
This commit is contained in:
@@ -100,9 +100,11 @@ public class SeekBarPreference extends DialogPreference
|
||||
mProgress = mSeekBar.getProgress() + mMin;
|
||||
String text = Integer.toString(mProgress);
|
||||
callChangeListener(text);
|
||||
SharedPreferences.Editor editor = getSharedPreferences().edit();
|
||||
editor.putString(getKey(), text);
|
||||
editor.commit();
|
||||
if (shouldCommit()) {
|
||||
SharedPreferences.Editor editor = getEditor();
|
||||
editor.putString(getKey(), text);
|
||||
editor.commit();
|
||||
}
|
||||
break;
|
||||
}
|
||||
super.onClick(dialog, which);
|
||||
|
||||
Reference in New Issue
Block a user