Page MenuHomePhabricator

D13336.id44175.diff
No OneTemporary

D13336.id44175.diff

diff --git a/lib/shared/ancestor-threads.js b/lib/shared/ancestor-threads.js
--- a/lib/shared/ancestor-threads.js
+++ b/lib/shared/ancestor-threads.js
@@ -3,6 +3,7 @@
import * as React from 'react';
import genesis from '../facts/genesis.js';
+import { useAllowOlmViaTunnelbrokerForDMs } from '../hooks/flag-hooks.js';
import {
ancestorThreadInfos,
threadInfoSelector,
@@ -20,14 +21,23 @@
state => threadInfoSelector(state)[genesis().id],
);
+ const usingOlmViaTunnelbrokerForDMs = useAllowOlmViaTunnelbrokerForDMs();
+
return React.useMemo(() => {
if (!threadIsPending(threadInfo.id)) {
return ancestorThreads.length > 1
? ancestorThreads.slice(0, -1)
: ancestorThreads;
}
- return genesisThreadInfo ? [genesisThreadInfo] : [];
- }, [ancestorThreads, genesisThreadInfo, threadInfo.id]);
+ return genesisThreadInfo && !usingOlmViaTunnelbrokerForDMs
+ ? [genesisThreadInfo]
+ : [];
+ }, [
+ ancestorThreads,
+ genesisThreadInfo,
+ threadInfo.id,
+ usingOlmViaTunnelbrokerForDMs,
+ ]);
}
export { useAncestorThreads };

File Metadata

Mime Type
text/plain
Expires
Mon, Dec 23, 4:49 PM (14 h, 56 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
2695426
Default Alt Text
D13336.id44175.diff (1 KB)

Event Timeline