Batch update preferences

This commit is contained in:
M66B
2023-09-09 10:10:27 +02:00
parent 6568345e09
commit 65ca2958c9
11 changed files with 94 additions and 10 deletions

View File

@@ -624,9 +624,17 @@ public class FragmentOptionsEncryption extends FragmentBase
@Override
public void onSharedPreferenceChanged(SharedPreferences prefs, String key) {
setOptions();
getMainHandler().removeCallbacks(update);
getMainHandler().postDelayed(update, FragmentOptions.DELAY_SETOPTIONS);
}
private Runnable update = new RunnableEx("encryption") {
@Override
protected void delegate() {
setOptions();
}
};
@Override
public void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {
inflater.inflate(R.menu.menu_options, menu);