mirror of
https://github.com/M66B/FairEmail.git
synced 2026-04-01 06:38:29 +02:00
Optimization
This commit is contained in:
@@ -64,7 +64,9 @@ import org.json.JSONObject;
|
||||
|
||||
import java.text.DateFormatSymbols;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Arrays;
|
||||
import java.util.Calendar;
|
||||
import java.util.Collections;
|
||||
import java.util.List;
|
||||
import java.util.Objects;
|
||||
|
||||
@@ -128,7 +130,7 @@ public class FragmentOptionsSynchronize extends FragmentBase implements SharedPr
|
||||
private int textColorTertiary;
|
||||
private int colorAccent;
|
||||
|
||||
private final static String[] RESET_OPTIONS = new String[]{
|
||||
private final static List<String> RESET_OPTIONS = Collections.unmodifiableList(Arrays.asList(
|
||||
"enabled", "poll_interval", "auto_optimize",
|
||||
"schedule", "schedule_start", "schedule_end", "schedule_start_weekend", "schedule_end_weekend", "weekend",
|
||||
"sync_quick_imap", "sync_quick_pop",
|
||||
@@ -138,7 +140,7 @@ public class FragmentOptionsSynchronize extends FragmentBase implements SharedPr
|
||||
"check_authentication", "check_tls", "check_reply_domain", "check_mx",
|
||||
"check_blocklist", "use_blocklist", "use_blocklist_pop",
|
||||
"tune_keep_alive"
|
||||
};
|
||||
));
|
||||
|
||||
@Override
|
||||
public void onCreate(Bundle savedInstanceState) {
|
||||
@@ -646,6 +648,9 @@ public class FragmentOptionsSynchronize extends FragmentBase implements SharedPr
|
||||
|
||||
@Override
|
||||
public void onSharedPreferenceChanged(SharedPreferences prefs, String key) {
|
||||
if (!RESET_OPTIONS.contains(key))
|
||||
return;
|
||||
|
||||
getMainHandler().removeCallbacks(update);
|
||||
getMainHandler().postDelayed(update, FragmentOptions.DELAY_SETOPTIONS);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user