From 32d7f49d4c8f62bd7f3742c53a080f5b7ebb65e2 Mon Sep 17 00:00:00 2001 From: Torsten Grote Date: Fri, 11 Oct 2024 11:16:25 -0300 Subject: [PATCH] show error notification when AppBackupWorker isn't successful otherwise there's no UI feedback when running backup manually --- .../java/com/stevesoltys/seedvault/worker/AppBackupWorker.kt | 2 ++ 1 file changed, 2 insertions(+) diff --git a/app/src/main/java/com/stevesoltys/seedvault/worker/AppBackupWorker.kt b/app/src/main/java/com/stevesoltys/seedvault/worker/AppBackupWorker.kt index dd07d77e..5ba281f6 100644 --- a/app/src/main/java/com/stevesoltys/seedvault/worker/AppBackupWorker.kt +++ b/app/src/main/java/com/stevesoltys/seedvault/worker/AppBackupWorker.kt @@ -124,6 +124,8 @@ class AppBackupWorker( Result.retry() } else { 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 if (tags.contains(TAG_RESCHEDULE)) return result else Result.success()