Page MenuHomePhabricator

D8526.id28770.diff
No OneTemporary

D8526.id28770.diff

diff --git a/lib/selectors/thread-selectors.js b/lib/selectors/thread-selectors.js
--- a/lib/selectors/thread-selectors.js
+++ b/lib/selectors/thread-selectors.js
@@ -200,6 +200,27 @@
},
);
+const containedThreadInfos: (state: BaseAppState<*>) => {
+ +[id: string]: $ReadOnlyArray<ThreadInfo>,
+} = createSelector(
+ threadInfoSelector,
+ (threadInfos: { +[id: string]: ThreadInfo }) => {
+ const result = {};
+ for (const id in threadInfos) {
+ const threadInfo = threadInfos[id];
+ const containingThreadID = threadInfo.containingThreadID;
+ if (containingThreadID === null || containingThreadID === undefined) {
+ continue;
+ }
+ if (result[containingThreadID] === undefined) {
+ result[containingThreadID] = [];
+ }
+ result[containingThreadID].push(threadInfo);
+ }
+ return result;
+ },
+);
+
function getMostRecentRawMessageInfo(
threadInfo: ThreadInfo,
messageStore: MessageStore,
@@ -453,6 +474,7 @@
entryInfoSelector,
currentDaysToEntries,
childThreadInfos,
+ containedThreadInfos,
unreadCount,
unreadBackgroundCount,
otherUsersButNoOtherAdmins,

File Metadata

Mime Type
text/plain
Expires
Sat, Nov 30, 3:43 AM (22 h, 18 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
2599407
Default Alt Text
D8526.id28770.diff (1 KB)

Event Timeline