Persist drafts

This commit is contained in:
Scott Nonnenberg 2019-08-06 17:40:25 -07:00
parent 5ebd8bc690
commit 9d4f2afa5a
23 changed files with 1048 additions and 720 deletions

11
main.js
View file

@ -724,6 +724,17 @@ app.on('ready', async () => {
userDataPath,
stickers: orphanedStickers,
});
const allDraftAttachments = await attachments.getAllDraftAttachments(
userDataPath
);
const orphanedDraftAttachments = await sql.removeKnownDraftAttachments(
allDraftAttachments
);
await attachments.deleteAllDraftAttachments({
userDataPath,
stickers: orphanedDraftAttachments,
});
}
try {