diff --git a/app/src/main/java/org/unifiedpush/distributor/nextpush/services/RestartWorker.kt b/app/src/main/java/org/unifiedpush/distributor/nextpush/services/RestartWorker.kt index ec7dfba..653913e 100644 --- a/app/src/main/java/org/unifiedpush/distributor/nextpush/services/RestartWorker.kt +++ b/app/src/main/java/org/unifiedpush/distributor/nextpush/services/RestartWorker.kt @@ -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() }