Skip to content

Commit cda8667

Browse files
committed
cleanup
1 parent 5f12e98 commit cda8667

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

app/src/main/java/de/lolhens/resticui/BackupManager.kt

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ class BackupManager private constructor(context: Context) {
5252
}
5353

5454
val notificationChannelId = "RESTIC_BACKUP_PROGRESS"
55-
var lastmillis = System.currentTimeMillis()
55+
private var lastMillis = 0L
5656

5757
private fun updateNotification(
5858
context: Context,
@@ -71,11 +71,11 @@ class BackupManager private constructor(context: Context) {
7171
when {
7272
activeBackup.inProgress -> {
7373
// reduce number of notification updates
74-
val nowmillis = System.currentTimeMillis()
75-
if ((nowmillis - lastmillis) < 333)
74+
val nowMillis = System.currentTimeMillis()
75+
if ((nowMillis - lastMillis) < 300)
7676
return
7777
else
78-
lastmillis = nowmillis
78+
lastMillis = nowMillis
7979

8080
// TODO: use somewhere
8181
val details = if (activeBackup.progress == null) null else {

0 commit comments

Comments
 (0)