Added idle restart for Outlook

This commit is contained in:
M66B
2022-09-02 12:28:38 +02:00
parent fd2ab14150
commit c720458e9d
4 changed files with 28 additions and 0 deletions

View File

@@ -1518,6 +1518,11 @@ 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)) {
int timeout = prefs.getInt("timeout", EmailService.DEFAULT_CONNECT_TIMEOUT);
iservice.setRestartIdleInterval(timeout * 2 * 6); // 20 x 2 x 6 = 4 min
}
final Date lastStillHere = new Date(0);
iservice.setListener(new StoreListener() {