Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Files
F3514173
D14157.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
1 KB
Referenced Files
None
Subscribers
None
D14157.diff
View Options
diff --git a/lib/selectors/chat-selectors.js b/lib/selectors/chat-selectors.js
--- a/lib/selectors/chat-selectors.js
+++ b/lib/selectors/chat-selectors.js
@@ -115,10 +115,17 @@
getCandidateSidebarItemsForThreadList(sidebars);
const lastUpdatedTimeIncludingSidebarsPromise = (async () => {
- const candidateSidebarItems = await candidateSidebarItemsPromise;
- const lastUpdatedTimes = candidateSidebarItems.map(
- sidebarItem => sidebarItem.lastUpdatedTime,
- );
+ const [lastUpdatedTimeResult, candidateSidebarItems] =
+ await Promise.all([
+ lastUpdatedTimePromise,
+ candidateSidebarItemsPromise,
+ ]);
+ const lastUpdatedTimes = [
+ lastUpdatedTimeResult,
+ ...candidateSidebarItems.map(
+ sidebarItem => sidebarItem.lastUpdatedTime,
+ ),
+ ];
const max = lastUpdatedTimes.reduce((a, b) => Math.max(a, b), -1);
return max;
})();
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Mon, Dec 23, 3:44 AM (19 h, 32 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
2682113
Default Alt Text
D14157.diff (1 KB)
Attached To
Mode
D14157: [lib] Consider parent timestamp in lastUpdatedTimeIncludingSidebars
Attached
Detach File
Event Timeline
Log In to Comment