Don't mark deletion failure if we are in an IDLE state.

This commit is contained in:
Alex Hart
2025-09-08 14:50:12 -03:00
parent 5e35c209c2
commit dca876e40d

View File

@@ -135,7 +135,9 @@ class BackupDeleteJob private constructor(
}
override fun onFailure() {
if (SignalStore.backup.deletionState == DeletionState.AWAITING_MEDIA_DOWNLOAD) {
if (SignalStore.backup.deletionState.isIdle()) {
Log.w(TAG, "Backup is idle. Not marking a deletion.")
} else if (SignalStore.backup.deletionState == DeletionState.AWAITING_MEDIA_DOWNLOAD) {
Log.w(TAG, "BackupDeleteFailure occurred while awaiting media download, ignoring.")
} else {
SignalStore.backup.deletionState = DeletionState.FAILED