mirror of
https://github.com/M66B/FairEmail.git
synced 2024-12-27 02:07:12 +00:00
Fixed early sync error report
This commit is contained in:
parent
d3c35746f0
commit
22259594cc
1 changed files with 2 additions and 2 deletions
|
@ -1785,7 +1785,8 @@ public class ServiceSynchronize extends ServiceBase implements SharedPreferences
|
|||
long delayed = now - account.last_connected - account.poll_interval * 60 * 1000L;
|
||||
long maxDelayed = (pollInterval > 0 && !account.poll_exempted
|
||||
? pollInterval * ACCOUNT_ERROR_AFTER_POLL : ACCOUNT_ERROR_AFTER) * 60 * 1000L;
|
||||
if (delayed > maxDelayed) {
|
||||
if (delayed > maxDelayed &&
|
||||
state.getBackoff() >= CONNECT_BACKOFF_ALARM_START * 60) {
|
||||
Log.i("Reporting sync error after=" + delayed);
|
||||
Throwable warning = new Throwable(
|
||||
getString(R.string.title_no_sync,
|
||||
|
@ -1795,7 +1796,6 @@ public class ServiceSynchronize extends ServiceBase implements SharedPreferences
|
|||
NotificationManager nm = (NotificationManager) getSystemService(Context.NOTIFICATION_SERVICE);
|
||||
nm.notify("receive:" + account.id, 1,
|
||||
Core.getNotificationError(this, "warning", account.name, warning)
|
||||
.setOnlyAlertOnce(state.getBackoff() < CONNECT_BACKOFF_ALARM_START * 60 * 1000L)
|
||||
.build());
|
||||
} catch (Throwable ex1) {
|
||||
Log.w(ex1);
|
||||
|
|
Loading…
Reference in a new issue