Simplify message lookup

This commit is contained in:
Jordan Wages 2025-07-05 19:58:11 -05:00
commit 79f49fd502
2 changed files with 3 additions and 9 deletions

View file

@ -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) {