Simplify message lookup
This commit is contained in:
parent
f40715add1
commit
79f49fd502
2 changed files with 3 additions and 9 deletions
|
@ -413,9 +413,7 @@ async function clearCacheForMessages(idsInput) {
|
|||
}
|
||||
} else if (msg?.type === "sortana:clearCacheForDisplayed") {
|
||||
try {
|
||||
const tabs = await browser.tabs.query({ active: true, lastFocusedWindow: true });
|
||||
const tabId = tabs[0]?.id;
|
||||
const msgs = tabId ? await browser.messageDisplay.getDisplayedMessages(tabId) : [];
|
||||
const msgs = await browser.messageDisplay.getDisplayedMessages();
|
||||
const ids = msgs.map(m => m.id);
|
||||
await clearCacheForMessages(ids);
|
||||
} catch (e) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue