diff --git a/app/src/main/java/org/tasks/notifications/NotificationClearedReceiver.kt b/app/src/main/java/org/tasks/notifications/NotificationClearedReceiver.kt index 85539a6cd..cf1743cb6 100644 --- a/app/src/main/java/org/tasks/notifications/NotificationClearedReceiver.kt +++ b/app/src/main/java/org/tasks/notifications/NotificationClearedReceiver.kt @@ -3,6 +3,7 @@ package org.tasks.notifications import android.content.BroadcastReceiver import android.content.Context import android.content.Intent +import com.todoroo.andlib.utility.DateUtilities.now import com.todoroo.astrid.alarms.AlarmService import dagger.hilt.android.AndroidEntryPoint import kotlinx.coroutines.CoroutineScope @@ -29,7 +30,10 @@ class NotificationClearedReceiver : BroadcastReceiver() { // snoozing for 0ms will cause the alarm service to miss this notification // so sleep for 1s instead if (snoozeTime == 0L) snoozeTime = 1000L - alarmService.snooze(snoozeTime, listOf(notificationId)) + alarmService.snooze( + time = now() + snoozeTime, + taskIds = listOf(notificationId) + ) } else { notificationManager.cancel(notificationId) } diff --git a/app/src/main/java/org/tasks/preferences/Preferences.kt b/app/src/main/java/org/tasks/preferences/Preferences.kt index d62dd8cfe..bc74c74cb 100644 --- a/app/src/main/java/org/tasks/preferences/Preferences.kt +++ b/app/src/main/java/org/tasks/preferences/Preferences.kt @@ -474,7 +474,9 @@ class Preferences @JvmOverloads constructor( getBoolean(R.string.p_rmd_swipe_to_snooze_enabled, false) fun swipeToSnoozeIntervalMS(): Long = + TimeUnit.MINUTES.toMillis( getIntegerFromString(R.string.p_rmd_swipe_to_snooze_time_minutes, 0).toLong() + ) var isSyncOngoing: Boolean get() = syncFlags.any { getBoolean(it, false) }