Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 6950df34 authored by Guillaume Jacquart's avatar Guillaume Jacquart
Browse files

fix:3268: WeeklyReport should be scheduled only on sundays.

parent 5d4563d1
Loading
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -60,7 +60,7 @@ class WeeklyReportWorkerScheduler(private val appContext: Context) {
        val now = ZonedDateTime.now()
        var nextDate: LocalDate = now.toLocalDate()

        nextDate.with(nextOrSame(WeeklyReportUseCase.REPORT_DAY_OF_WEEK))
        nextDate = nextDate.with(nextOrSame(WeeklyReportUseCase.REPORT_DAY_OF_WEEK))

        // Report has already been created today,
        // next report will be scheduled for next week