mirror of
https://codeberg.org/timelimit/timelimit-android.git
synced 2025-10-05 10:49:26 +02:00
Fix time warning timing
This commit is contained in:
parent
7e101e6000
commit
6c7179ef3e
1 changed files with 1 additions and 1 deletions
|
@ -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) {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue