From 18cceec8279c8f1d776c0748b873e8cb28e0daa6 Mon Sep 17 00:00:00 2001 From: friedPotat0 <5374007+friedPotat0@users.noreply.github.com> Date: Fri, 8 Jul 2022 01:03:57 +0200 Subject: [PATCH] fix: score column empty on message filter --- src/background/background.js | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/src/background/background.js b/src/background/background.js index 32810f8..9af1433 100644 --- a/src/background/background.js +++ b/src/background/background.js @@ -113,6 +113,17 @@ async function onMessageDisplayed(tab, message) { } } +/** + * Fired when the selected messages change in any mail tab. + * @param {Tab} tab + * @param {MessageList} selectedMessages + */ +async function onSelectedMessagesChanged(tab, selectedMessages) { + const spamScores = messenger.SpamScores + const win = await messenger.windows.getCurrent() + spamScores.repaint(win.id) +} + /** * Fired when the displayed folder changes in any mail tab * @param {Tab} tab @@ -166,6 +177,7 @@ const init = async () => { // Add Listeners messenger.messageDisplay.onMessageDisplayed.addListener(onMessageDisplayed) messenger.mailTabs.onDisplayedFolderChanged.addListener(onDisplayedFolderChanged) + messenger.mailTabs.onSelectedMessagesChanged.addListener(onSelectedMessagesChanged) const win = await messenger.windows.getCurrent() spamScores.repaint(win.id)