mirror of https://github.com/M66B/FairEmail.git
Reset keep-alive tuning on changing interval
This commit is contained in:
parent
a123fb85b6
commit
b64ee170eb
|
@ -925,8 +925,8 @@ public class FragmentAccount extends FragmentBase {
|
||||||
throw new IllegalArgumentException(context.getString(R.string.title_no_user));
|
throw new IllegalArgumentException(context.getString(R.string.title_no_user));
|
||||||
if (synchronize && TextUtils.isEmpty(password) && !insecure && certificate == null && !should)
|
if (synchronize && TextUtils.isEmpty(password) && !insecure && certificate == null && !should)
|
||||||
throw new IllegalArgumentException(context.getString(R.string.title_no_password));
|
throw new IllegalArgumentException(context.getString(R.string.title_no_password));
|
||||||
if (TextUtils.isEmpty(interval))
|
int poll_interval = (TextUtils.isEmpty(interval)
|
||||||
interval = Integer.toString(EntityAccount.DEFAULT_KEEP_ALIVE_INTERVAL);
|
? EntityAccount.DEFAULT_KEEP_ALIVE_INTERVAL : Integer.parseInt(interval));
|
||||||
|
|
||||||
if (TextUtils.isEmpty(realm))
|
if (TextUtils.isEmpty(realm))
|
||||||
realm = null;
|
realm = null;
|
||||||
|
@ -982,7 +982,7 @@ public class FragmentAccount extends FragmentBase {
|
||||||
return true;
|
return true;
|
||||||
if (!Objects.equals(account.auto_seen, auto_seen))
|
if (!Objects.equals(account.auto_seen, auto_seen))
|
||||||
return true;
|
return true;
|
||||||
if (!Objects.equals(account.poll_interval, Integer.parseInt(interval)))
|
if (!Objects.equals(account.poll_interval, poll_interval))
|
||||||
return true;
|
return true;
|
||||||
if (!Objects.equals(account.partial_fetch, partial_fetch))
|
if (!Objects.equals(account.partial_fetch, partial_fetch))
|
||||||
return true;
|
return true;
|
||||||
|
@ -1110,7 +1110,13 @@ public class FragmentAccount extends FragmentBase {
|
||||||
account.notify = notify;
|
account.notify = notify;
|
||||||
account.browse = browse;
|
account.browse = browse;
|
||||||
account.auto_seen = auto_seen;
|
account.auto_seen = auto_seen;
|
||||||
account.poll_interval = Integer.parseInt(interval);
|
|
||||||
|
if (account.poll_interval != poll_interval) {
|
||||||
|
account.keep_alive_ok = false;
|
||||||
|
account.keep_alive_failed = 0;
|
||||||
|
}
|
||||||
|
account.poll_interval = poll_interval;
|
||||||
|
|
||||||
account.partial_fetch = partial_fetch;
|
account.partial_fetch = partial_fetch;
|
||||||
account.ignore_size = ignore_size;
|
account.ignore_size = ignore_size;
|
||||||
account.use_date = use_date;
|
account.use_date = use_date;
|
||||||
|
|
Loading…
Reference in New Issue