mirror of
https://github.com/signalapp/Signal-Desktop.git
synced 2026-04-25 10:58:19 +01:00
Don't forget to cleanup in-memory sticker pack
This commit is contained in:
@@ -5058,7 +5058,7 @@ async function addStickerPackReference(
|
||||
async function deleteStickerPackReference(
|
||||
messageId: string,
|
||||
packId: string
|
||||
): Promise<Array<string>> {
|
||||
): Promise<ReadonlyArray<string> | undefined> {
|
||||
const db = getInstance();
|
||||
|
||||
if (!messageId) {
|
||||
@@ -5110,7 +5110,7 @@ async function deleteStickerPackReference(
|
||||
}
|
||||
const count = countRow['count(*)'];
|
||||
if (count > 0) {
|
||||
return [];
|
||||
return undefined;
|
||||
}
|
||||
|
||||
const packRow: { status: StickerPackStatusType } = db
|
||||
@@ -5123,12 +5123,12 @@ async function deleteStickerPackReference(
|
||||
.get({ packId });
|
||||
if (!packRow) {
|
||||
console.log('deleteStickerPackReference: did not find referenced pack');
|
||||
return [];
|
||||
return undefined;
|
||||
}
|
||||
const { status } = packRow;
|
||||
|
||||
if (status === 'installed') {
|
||||
return [];
|
||||
return undefined;
|
||||
}
|
||||
|
||||
const stickerPathRows: Array<{ path: string }> = db
|
||||
|
||||
Reference in New Issue
Block a user