Added account option for IMAP IDLE restart

This commit is contained in:
M66B
2022-09-03 11:22:44 +02:00
parent d51ffd7972
commit 1b382c3fcc
11 changed files with 2854 additions and 6 deletions

View File

@@ -1518,7 +1518,7 @@ public class ServiceSynchronize extends ServiceBase implements SharedPreferences
if (account.protocol != EntityAccount.TYPE_IMAP)
iservice.setLeaveOnServer(account.leave_on_server);
if ("outlook.office365.com".equalsIgnoreCase(account.host)) {
if (account.keep_alive_noop) {
int timeout = prefs.getInt("timeout", EmailService.DEFAULT_CONNECT_TIMEOUT);
iservice.setRestartIdleInterval(timeout * 2 * 6); // 20 x 2 x 6 = 4 min
}