mirror of
https://codeberg.org/NextPush/nextpush-android.git
synced 2024-12-26 09:42:39 +01:00
Update lastEventDate only when we start the service
This commit is contained in:
parent
11dbfcd6e9
commit
38de5edeaa
@ -37,13 +37,15 @@ class RestartWorker(ctx: Context, params: WorkerParameters) : Worker(ctx, params
|
||||
Log.d(TAG, "We should have received an event before ${restartDate.time}. Restarting")
|
||||
/** We do not update [FailureHandler]'s counter, it will be done by the next requests. */
|
||||
StartService.startListener(applicationContext)
|
||||
// We consider this run as the first event
|
||||
AppCompanion.lastEventDate = currentDate
|
||||
}
|
||||
} ?: run {
|
||||
Log.d(TAG, "Restarting")
|
||||
StartService.startListener(applicationContext)
|
||||
// We consider this run as the first event
|
||||
AppCompanion.lastEventDate = currentDate
|
||||
}
|
||||
// We consider this run as the first event
|
||||
AppCompanion.lastEventDate = currentDate
|
||||
}
|
||||
return Result.success()
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user