1
0
Fork 0
mirror of https://github.com/M66B/FairEmail.git synced 2024-12-23 08:14:45 +00:00

Disable auto optimize on exempting account

This commit is contained in:
M66B 2022-10-18 12:33:22 +02:00
parent 43cc8359bc
commit be5692ffd7

View file

@ -705,6 +705,11 @@ public class FragmentOptionsSynchronize extends FragmentBase implements SharedPr
long id = args.getLong("id");
boolean exempted = args.getBoolean("exempted");
if (exempted) {
SharedPreferences prefs = PreferenceManager.getDefaultSharedPreferences(context);
prefs.edit().remove("auto_optimize").apply();
}
DB db = DB.getInstance(context);
db.account().setAccountPollExempted(id, exempted);