Page MenuHomePhabricator

D14158.diff
No OneTemporary

D14158.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
Mon, Dec 23, 2:06 AM (18 h, 23 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
2687978
Default Alt Text
D14158.diff (777 B)

Event Timeline