Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Files
F3513794
D14158.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
777 B
Referenced Files
None
Subscribers
None
D14158.diff
View Options
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
Details
Attached
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)
Attached To
Mode
D14158: [lib] Deduplicate in getCandidateSidebarItemsForThreadList
Attached
Detach File
Event Timeline
Log In to Comment