Compare commits
2 Commits
4ed59e5b66
...
a31550e205
Author | SHA1 | Date | |
---|---|---|---|
a31550e205 | |||
d8167a3a3d |
@ -35,11 +35,11 @@ var functions = {
|
||||
};
|
||||
|
||||
functions.getFiles("emoji").then(data => {
|
||||
if (!data.error) chrome.runtime.sendMessage(["storeFiles", data, "emoji"]);
|
||||
if (!data.error) chrome.runtime.sendMessage(["storeFiles", data.body, "emoji"]);
|
||||
else console.error(data.error);
|
||||
});
|
||||
functions.getFiles("sticker").then(data => {
|
||||
if (!data.error) chrome.runtime.sendMessage(["storeFiles", data, "sticker"]);
|
||||
if (!data.error) chrome.runtime.sendMessage(["storeFiles", data.body, "sticker"]);
|
||||
else console.error(data.error);
|
||||
});
|
||||
|
||||
|
@ -269,6 +269,8 @@ function createEmojiSquare({internalId, data, animationStyle, currentId_emoji, c
|
||||
errorDiv.innerText = "";
|
||||
try {
|
||||
await callContentScript("deleteFile", this.dataset["currentId_"+mode]);
|
||||
await db.updateImage(this.dataset.internalId, {["currentId_"+mode]: null});
|
||||
delete this.dataset["currentId_"+mode];
|
||||
} catch (error) {
|
||||
this.dataset.state = lastState;
|
||||
select.disabled = false;
|
||||
@ -287,7 +289,8 @@ function createEmojiSquare({internalId, data, animationStyle, currentId_emoji, c
|
||||
},
|
||||
async delete() {
|
||||
await db.deleteImage(this.dataset.internalId);
|
||||
if (this.dataset["currentId_"+mode]) callContentScript("deleteFile", this.dataset["currentId_"+mode]).catch(displayError);
|
||||
if (this.dataset["currentId_emoji"]) callContentScript("deleteFile", this.dataset["currentId_emoji"]).catch(displayError);
|
||||
if (this.dataset["currentId_sticker"]) callContentScript("deleteFile", this.dataset["currentId_sticker"]).catch(displayError);
|
||||
this.remove();
|
||||
}
|
||||
});
|
||||
|
Loading…
Reference in New Issue
Block a user