Skip to content

Commit

Permalink
Merge pull request #52 from friedPotat0/fix/column-repaint
Browse files Browse the repository at this point in the history
Fix/column repaint
  • Loading branch information
friedPotat0 authored Jul 25, 2022
2 parents 96a2f78 + 18cceec commit e033b9c
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 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,10 @@ 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)

// Init Data
const [lowerBounds, upperBounds] = getBounds(storage)
Expand Down

0 comments on commit e033b9c

Please sign in to comment.