Page MenuHomePhabricator

D14157.diff
No OneTemporary

D14157.diff

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

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)

Event Timeline