show error notification when AppBackupWorker isn't successful

otherwise there's no UI feedback when running backup manually
This commit is contained in:
Torsten Grote 2024-10-11 11:16:25 -03:00
parent 2957678465
commit 32d7f49d4c
No known key found for this signature in database
GPG key ID: 3E5F77D92CF891FF

View file

@ -124,6 +124,8 @@ class AppBackupWorker(
Result.retry() Result.retry()
} else { } else {
val result = doBackup() val result = doBackup()
// show error notification if backup wasn't successful (maybe only when no retry?)
if (result != Result.success()) nm.onBackupError()
// only allow retrying if rescheduling is allowed // only allow retrying if rescheduling is allowed
if (tags.contains(TAG_RESCHEDULE)) return result if (tags.contains(TAG_RESCHEDULE)) return result
else Result.success() else Result.success()