mirror of
https://github.com/signalapp/Signal-Desktop.git
synced 2025-12-24 20:26:24 +00:00
Support additional sticker states
Co-authored-by: scott@signal.org Co-authored-by: ken@signal.org
This commit is contained in:
committed by
Scott Nonnenberg
parent
41880cfe66
commit
be5d0837f8
@@ -33,7 +33,7 @@
|
||||
const {
|
||||
copyStickerToAttachments,
|
||||
deletePackReference,
|
||||
downloadStickerPack,
|
||||
savePackMetadata,
|
||||
getStickerPackStatus,
|
||||
} = window.Signal.Stickers;
|
||||
const { addStickerPackReference } = window.Signal.Data;
|
||||
@@ -1467,7 +1467,7 @@
|
||||
const status = getStickerPackStatus(packId);
|
||||
let data;
|
||||
|
||||
if (status && status !== 'pending' && status !== 'error') {
|
||||
if (status && (status === 'downloaded' || status === 'installed')) {
|
||||
try {
|
||||
const copiedSticker = await copyStickerToAttachments(
|
||||
packId,
|
||||
@@ -1492,8 +1492,8 @@
|
||||
});
|
||||
}
|
||||
if (!status) {
|
||||
// kick off the download without waiting
|
||||
downloadStickerPack(packId, packKey, { messageId });
|
||||
// Save the packId/packKey for future download/install
|
||||
savePackMetadata(packId, packKey, { messageId });
|
||||
} else {
|
||||
await addStickerPackReference(messageId, packId);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user