diff --git a/lib/shared/sidebar-item-utils.js b/lib/shared/sidebar-item-utils.js --- a/lib/shared/sidebar-item-utils.js +++ b/lib/shared/sidebar-item-utils.js @@ -167,10 +167,16 @@ topUnreadPromise, ]); - const topResults = [ - ...topGeneralResults.slice(0, maxReadSidebars), - ...topUnreadResults.slice(0, maxUnreadSidebars), - ]; + const topResults = topUnreadResults.slice(0, maxUnreadSidebars); + const topThreadIDs = new Set([ + ...topResults.map(result => result.threadInfo.id), + ]); + const generalResults = topGeneralResults.slice(0, maxReadSidebars); + for (const result of generalResults) { + if (!topThreadIDs.has(result.threadInfo.id)) { + topResults.push(result); + } + } return topResults.map(result => { const {