mirror of
https://github.com/M66B/FairEmail.git
synced 2026-04-05 08:33:37 +02:00
Persist account capabilities
This commit is contained in:
@@ -1282,6 +1282,9 @@ public class ServiceSynchronize extends ServiceBase implements SharedPreferences
|
||||
|
||||
// https://tools.ietf.org/html/rfc2177
|
||||
final boolean capIdle = iservice.hasCapability("IDLE");
|
||||
final boolean capUtf8 =
|
||||
iservice.hasCapability("UTF8=ACCEPT") ||
|
||||
iservice.hasCapability("UTF8=ONLY");
|
||||
Log.i(account.name + " idle=" + capIdle);
|
||||
if (!capIdle || account.poll_interval < OPTIMIZE_KEEP_ALIVE_INTERVAL)
|
||||
optimizeAccount(account, "IDLE");
|
||||
@@ -1289,6 +1292,7 @@ public class ServiceSynchronize extends ServiceBase implements SharedPreferences
|
||||
final boolean capNotify = iservice.hasCapability("NOTIFY");
|
||||
|
||||
db.account().setAccountState(account.id, "connected");
|
||||
db.account().setAccountCapabilities(account.id, capIdle, capUtf8);
|
||||
db.account().setAccountError(account.id, null);
|
||||
db.account().setAccountWarning(account.id, null);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user