mirror of https://github.com/M66B/FairEmail.git
Reset keep alive on apply to all system folders
This commit is contained in:
parent
12982cfd71
commit
9b7d84db80
|
@ -1048,7 +1048,7 @@ public class FragmentFolders extends FragmentBase {
|
||||||
new SimpleTask<Void>() {
|
new SimpleTask<Void>() {
|
||||||
@Override
|
@Override
|
||||||
protected Void onExecute(Context context, Bundle args) throws Throwable {
|
protected Void onExecute(Context context, Bundle args) throws Throwable {
|
||||||
long account = args.getLong("account");
|
long aid = args.getLong("account");
|
||||||
Boolean enable = null;
|
Boolean enable = null;
|
||||||
if (args.containsKey("enable"))
|
if (args.containsKey("enable"))
|
||||||
enable = args.getBoolean("enable");
|
enable = args.getBoolean("enable");
|
||||||
|
@ -1066,7 +1066,14 @@ public class FragmentFolders extends FragmentBase {
|
||||||
try {
|
try {
|
||||||
db.beginTransaction();
|
db.beginTransaction();
|
||||||
|
|
||||||
List<EntityFolder> folders = db.folder().getFolders(account, false, true);
|
EntityAccount account = db.account().getAccount(aid);
|
||||||
|
if (account == null)
|
||||||
|
return null;
|
||||||
|
|
||||||
|
if (system && account.poll_interval > 15)
|
||||||
|
db.account().setAccountKeepAliveInterval(account.id, 15);
|
||||||
|
|
||||||
|
List<EntityFolder> folders = db.folder().getFolders(aid, false, true);
|
||||||
if (folders == null)
|
if (folders == null)
|
||||||
return null;
|
return null;
|
||||||
|
|
||||||
|
@ -1095,7 +1102,7 @@ public class FragmentFolders extends FragmentBase {
|
||||||
db.endTransaction();
|
db.endTransaction();
|
||||||
}
|
}
|
||||||
|
|
||||||
ServiceSynchronize.reload(context, account, false, "Apply");
|
ServiceSynchronize.reload(context, aid, false, "Apply");
|
||||||
|
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue