mirror of
https://github.com/M66B/FairEmail.git
synced 2026-03-30 21:58:52 +02:00
Batch update preferences
This commit is contained in:
@@ -722,9 +722,17 @@ public class FragmentOptionsSend extends FragmentBase implements SharedPreferenc
|
||||
|
||||
@Override
|
||||
public void onSharedPreferenceChanged(SharedPreferences prefs, String key) {
|
||||
setOptions();
|
||||
getMainHandler().removeCallbacks(update);
|
||||
getMainHandler().postDelayed(update, FragmentOptions.DELAY_SETOPTIONS);
|
||||
}
|
||||
|
||||
private Runnable update = new RunnableEx("send") {
|
||||
@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