Page MenuHomePhorge

D10458.1765031639.diff
No OneTemporary

Size
3 KB
Referenced Files
None
Subscribers
None

D10458.1765031639.diff

diff --git a/lib/components/chat-mention-provider.react.js b/lib/components/chat-mention-provider.react.js
--- a/lib/components/chat-mention-provider.react.js
+++ b/lib/components/chat-mention-provider.react.js
@@ -71,9 +71,7 @@
);
}
-function getChatMentionCandidates(threadInfos: {
- +[id: string]: ResolvedThreadInfo,
-}): {
+function getChatMentionCandidates(resolvedThreadInfos: ChatMentionCandidates): {
chatMentionCandidatesObj: ChatMentionCandidatesObj,
communityThreadIDForGenesisThreads: { +[id: string]: string },
} {
@@ -84,32 +82,36 @@
} = {};
const visitedGenesisThreads = new Set<string>();
const communityThreadIDForGenesisThreads: { [string]: string } = {};
- for (const currentThreadID in threadInfos) {
- const currentThreadInfo = threadInfos[currentThreadID];
- const { community: currentThreadCommunity } = currentThreadInfo;
+ for (const currentThreadID in resolvedThreadInfos) {
+ const currentResolvedThreadInfo = resolvedThreadInfos[currentThreadID];
+ const { community: currentThreadCommunity } = currentResolvedThreadInfo;
if (!currentThreadCommunity) {
if (!result[currentThreadID]) {
- result[currentThreadID] = { [currentThreadID]: currentThreadInfo };
+ result[currentThreadID] = {
+ [currentThreadID]: currentResolvedThreadInfo,
+ };
}
continue;
}
if (!result[currentThreadCommunity]) {
result[currentThreadCommunity] = {};
result[currentThreadCommunity][currentThreadCommunity] =
- threadInfos[currentThreadCommunity];
+ resolvedThreadInfos[currentThreadCommunity];
}
// Handle GENESIS community case: mentioning inside GENESIS should only
// show chats and threads inside the top level that is below GENESIS.
- if (threadInfos[currentThreadCommunity].type === threadTypes.GENESIS) {
+ if (
+ resolvedThreadInfos[currentThreadCommunity].type === threadTypes.GENESIS
+ ) {
if (visitedGenesisThreads.has(currentThreadID)) {
continue;
}
- const threadTraversePath = [currentThreadInfo];
+ const threadTraversePath = [currentResolvedThreadInfo];
visitedGenesisThreads.add(currentThreadID);
- let currentlySelectedThreadID = currentThreadInfo.parentThreadID;
+ let currentlySelectedThreadID = currentResolvedThreadInfo.parentThreadID;
while (currentlySelectedThreadID) {
const currentlySelectedThreadInfo =
- threadInfos[currentlySelectedThreadID];
+ resolvedThreadInfos[currentlySelectedThreadID];
if (
visitedGenesisThreads.has(currentlySelectedThreadID) ||
!currentlySelectedThreadInfo ||
@@ -125,7 +127,7 @@
threadTraversePath[threadTraversePath.length - 1];
let lastThreadInTraversePathParentID;
if (lastThreadInTraversePath.parentThreadID) {
- lastThreadInTraversePathParentID = threadInfos[
+ lastThreadInTraversePathParentID = resolvedThreadInfos[
lastThreadInTraversePath.parentThreadID
]
? lastThreadInTraversePath.parentThreadID
@@ -134,7 +136,7 @@
lastThreadInTraversePathParentID = lastThreadInTraversePath.id;
}
if (
- threadInfos[lastThreadInTraversePathParentID].type ===
+ resolvedThreadInfos[lastThreadInTraversePathParentID].type ===
threadTypes.GENESIS
) {
if (!result[lastThreadInTraversePath.id]) {
@@ -172,7 +174,7 @@
}
continue;
}
- result[currentThreadCommunity][currentThreadID] = currentThreadInfo;
+ result[currentThreadCommunity][currentThreadID] = currentResolvedThreadInfo;
}
return {
chatMentionCandidatesObj: result,

File Metadata

Mime Type
text/plain
Expires
Sat, Dec 6, 2:33 PM (16 h, 23 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
5838608
Default Alt Text
D10458.1765031639.diff (3 KB)

Event Timeline