Skip media restoration if we're on the free tier.

This commit is contained in:
Alex Hart
2025-08-08 13:25:59 -03:00
committed by Greyson Parrelli
parent 784a64c353
commit 995215be2a

View File

@@ -147,6 +147,11 @@ class BackupDeleteJob private constructor(
}
private fun isMediaRestoreRequired(): Boolean {
if (backupDeleteJobData.tier != BackupDeleteJobData.Tier.PAID) {
Log.i(TAG, "User is not on the PAID tier so there's nothing we can download.")
return false
}
val requiresMediaRestore = SignalDatabase.attachments.getRemainingRestorableAttachmentSize() > 0L
val hasOffloadedMedia = SignalDatabase.attachments.getOptimizedMediaAttachmentSize() > 0L