Page MenuHomePhorge

D14633.1768409917.diff
No OneTemporary

Size
3 KB
Referenced Files
None
Subscribers
None

D14633.1768409917.diff

diff --git a/lib/shared/threads/protocols/dm-thread-protocol.js b/lib/shared/threads/protocols/dm-thread-protocol.js
--- a/lib/shared/threads/protocols/dm-thread-protocol.js
+++ b/lib/shared/threads/protocols/dm-thread-protocol.js
@@ -561,7 +561,7 @@
usersWithoutDeviceListExcludedFromSearchResult: true,
supportsMediaGallery: false,
chatThreadListIcon: 'lock',
- breadCrumbs: () => 'Local DM',
+ threadAncestorLabel: () => 'Local DM',
},
uploadMultimediaMetadataToKeyserver: false,
diff --git a/lib/shared/threads/protocols/keyserver-thread-protocol.js b/lib/shared/threads/protocols/keyserver-thread-protocol.js
--- a/lib/shared/threads/protocols/keyserver-thread-protocol.js
+++ b/lib/shared/threads/protocols/keyserver-thread-protocol.js
@@ -357,7 +357,7 @@
usersWithoutDeviceListExcludedFromSearchResult: false,
supportsMediaGallery: true,
chatThreadListIcon: 'server',
- breadCrumbs: (ancestorPath: React.Node) => ancestorPath,
+ threadAncestorLabel: (ancestorPath: React.Node) => ancestorPath,
},
uploadMultimediaMetadataToKeyserver: true,
diff --git a/lib/shared/threads/thread-spec.js b/lib/shared/threads/thread-spec.js
--- a/lib/shared/threads/thread-spec.js
+++ b/lib/shared/threads/thread-spec.js
@@ -266,7 +266,7 @@
+usersWithoutDeviceListExcludedFromSearchResult: boolean,
+supportsMediaGallery: boolean,
+chatThreadListIcon: string,
- +breadCrumbs: (ancestorPath: React.Node) => React.Node,
+ +threadAncestorLabel: (ancestorPath: React.Node) => React.Node,
},
+uploadMultimediaMetadataToKeyserver: boolean,
+canActionsTargetPendingMessages: boolean,
diff --git a/native/components/thread-ancestors-label.react.js b/native/components/thread-ancestors-label.react.js
--- a/native/components/thread-ancestors-label.react.js
+++ b/native/components/thread-ancestors-label.react.js
@@ -5,8 +5,8 @@
import { Text, View } from 'react-native';
import { useAncestorThreads } from 'lib/shared/ancestor-threads.js';
+import { threadSpecs } from 'lib/shared/threads/thread-specs.js';
import type { ThreadInfo } from 'lib/types/minimally-encoded-thread-permissions-types.js';
-import { threadTypeIsThick } from 'lib/types/thread-types-enum.js';
import { useResolvedThreadInfos } from 'lib/utils/entity-helpers.js';
import { useColors, useStyles } from '../themes/colors.js';
@@ -51,17 +51,18 @@
return unread ? [styles.pathText, styles.unread] : styles.pathText;
}, [styles.pathText, styles.unread, unread]);
- const isThick = threadTypeIsThick(threadInfo.type);
-
return React.useMemo(() => {
- const label = isThick ? 'Local DM' : ancestorPath;
+ const label =
+ threadSpecs[
+ threadInfo.type
+ ].protocol.presentationDetails.threadAncestorLabel(ancestorPath);
return (
<Text numberOfLines={1} style={ancestorPathStyle}>
{label}
</Text>
);
- }, [ancestorPath, ancestorPathStyle, isThick]);
+ }, [ancestorPath, ancestorPathStyle, threadInfo.type]);
}
const unboundStyles = {
diff --git a/web/chat/chat-thread-list-item.react.js b/web/chat/chat-thread-list-item.react.js
--- a/web/chat/chat-thread-list-item.react.js
+++ b/web/chat/chat-thread-list-item.react.js
@@ -134,9 +134,9 @@
const iconClass = unread ? css.iconUnread : css.iconRead;
const icon = isThick ? lock : server;
const breadCrumbs =
- threadSpecs[threadInfo.type].protocol.presentationDetails.breadCrumbs(
- ancestorPath,
- );
+ threadSpecs[
+ threadInfo.type
+ ].protocol.presentationDetails.threadAncestorLabel(ancestorPath);
return (
<>

File Metadata

Mime Type
text/plain
Expires
Wed, Jan 14, 4:58 PM (1 h, 56 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
5929037
Default Alt Text
D14633.1768409917.diff (3 KB)

Event Timeline