fix: recipient autoDownload state being set incorrectly

This commit is contained in:
0x330a
2022-11-11 13:44:19 +11:00
parent 995ac45ed9
commit e07a92d427
2 changed files with 1 additions and 2 deletions

View File

@@ -47,7 +47,6 @@ class DownloadDialog(private val recipient: Recipient,
}
private fun download() {
// TODO: add attachment download job trigger with attachmentID and databaseMessageID
JobQueue.shared.createAndStartAttachmentDownload(databaseAttachment)
dismiss()
}

View File

@@ -313,7 +313,7 @@ public class RecipientDatabase extends Database {
ContentValues values = new ContentValues();
values.put(AUTO_DOWNLOAD, shouldAutoDownloadAttachments ? 1 : 0);
db.update(TABLE_NAME, values, ADDRESS+ " = ?", new String[]{recipient.getAddress().serialize()});
recipient.resolve().setAutoDownloadAttachments(true);
recipient.resolve().setAutoDownloadAttachments(shouldAutoDownloadAttachments);
} finally {
db.endTransaction();
}