Skip to content

Commit

Permalink
fix: score column empty on message filter
Browse files Browse the repository at this point in the history
  • Loading branch information
friedPotat0 committed Jul 7, 2022
1 parent b37b3b6 commit 18cceec
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions src/background/background.js
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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)
Expand Down

0 comments on commit 18cceec

Please sign in to comment.