mirror of
https://github.com/M66B/FairEmail.git
synced 2026-03-31 06:08:31 +02:00
Batch update preferences
This commit is contained in:
@@ -792,9 +792,17 @@ public class FragmentOptionsNotifications extends FragmentBase implements Shared
|
||||
|
||||
@Override
|
||||
public void onSharedPreferenceChanged(SharedPreferences prefs, String key) {
|
||||
setOptions();
|
||||
getMainHandler().removeCallbacks(update);
|
||||
getMainHandler().postDelayed(update, FragmentOptions.DELAY_SETOPTIONS);
|
||||
}
|
||||
|
||||
private Runnable update = new RunnableEx("notifications") {
|
||||
@Override
|
||||
protected void delegate() {
|
||||
setOptions();
|
||||
}
|
||||
};
|
||||
|
||||
@Override
|
||||
public void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {
|
||||
inflater.inflate(R.menu.menu_options, menu);
|
||||
|
||||
Reference in New Issue
Block a user