Page MenuHomePhabricator

D14158.id46457.diff
No OneTemporary

D14158.id46457.diff

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 {

File Metadata

Mime Type
text/plain
Expires
Sun, Dec 22, 12:21 PM (10 h, 4 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
2687978
Default Alt Text
D14158.id46457.diff (777 B)

Event Timeline