Fix time warning timing

This commit is contained in:
Jonas L 2019-06-03 00:00:00 +00:00
parent 7e101e6000
commit 6c7179ef3e

View file

@ -480,7 +480,7 @@ class BackgroundTaskLogic(val appLogic: AppLogic) {
if (oldRemainingTime / (1000 * 60) != newRemainingTime / (1000 * 60)) { if (oldRemainingTime / (1000 * 60) != newRemainingTime / (1000 * 60)) {
// eventually show remaining time warning // eventually show remaining time warning
val roundedNewTime = (newRemainingTime / (1000 * 60)) * (1000 * 60) val roundedNewTime = ((newRemainingTime / (1000 * 60)) + 1) * (1000 * 60)
val flagIndex = CategoryTimeWarnings.durationToBitIndex[roundedNewTime] val flagIndex = CategoryTimeWarnings.durationToBitIndex[roundedNewTime]
if (flagIndex != null && category.timeWarnings and (1 shl flagIndex) != 0) { if (flagIndex != null && category.timeWarnings and (1 shl flagIndex) != 0) {