Fix swipe to snooze time

pull/2849/head^2
Alex Baker 3 weeks ago
parent a1da71d3e1
commit 782f4d6d7c

@ -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)
}

@ -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) }

Loading…
Cancel
Save