Page Menu
Home
Phorge
Search
Configure Global Search
Log In
Files
F32164487
D15376.1765048291.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Flag For Later
Award Token
Size
5 KB
Referenced Files
None
Subscribers
None
D15376.1765048291.diff
View Options
diff --git a/lib/shared/threads/protocols/farcaster-thread-protocol.js b/lib/shared/threads/protocols/farcaster-thread-protocol.js
--- a/lib/shared/threads/protocols/farcaster-thread-protocol.js
+++ b/lib/shared/threads/protocols/farcaster-thread-protocol.js
@@ -829,8 +829,8 @@
membershipChangesShownInThreadPreview: false,
usersWithoutDeviceListExcludedFromSearchResult: false,
supportsMediaGallery: false,
- nativeChatThreadListIcon: 'lock',
- webChatThreadListIcon: 'lock',
+ nativeChatThreadListIcon: 'farcaster',
+ webChatThreadListIcon: 'farcaster',
threadAncestorLabel: () => 'Farcaster DC',
protocolIcon: 'farcaster',
description:
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
@@ -484,7 +484,7 @@
+usersWithoutDeviceListExcludedFromSearchResult: boolean,
+supportsMediaGallery: boolean,
+nativeChatThreadListIcon: string,
- +webChatThreadListIcon: 'lock' | 'server',
+ +webChatThreadListIcon: 'lock' | 'server' | 'farcaster',
+threadAncestorLabel: (ancestorPath: React.Node) => React.Node,
+protocolIcon: 'lock' | 'server' | 'farcaster',
+description: string,
diff --git a/native/chat/chat-thread-list-item.react.js b/native/chat/chat-thread-list-item.react.js
--- a/native/chat/chat-thread-list-item.react.js
+++ b/native/chat/chat-thread-list-item.react.js
@@ -21,6 +21,7 @@
import ThreadAncestorsLabel from '../components/thread-ancestors-label.react.js';
import UnreadDot from '../components/unread-dot.react.js';
import { useColors, useStyles } from '../themes/colors.js';
+import FarcasterLogo from '../vectors/farcaster-logo.react.js';
type Props = {
+data: ChatThreadItem,
@@ -135,17 +136,27 @@
const iconStyle = data.threadInfo.currentUser.unread
? styles.iconUnread
: styles.iconRead;
- const iconName =
+ const nativeChatThreadListIcon =
threadSpecs[data.threadInfo.type].protocol().presentationDetails
.nativeChatThreadListIcon;
+ let iconComponent;
+ if (nativeChatThreadListIcon === 'farcaster') {
+ iconComponent = (
+ <View style={styles.farcasterIcon}>
+ <FarcasterLogo size={8} />
+ </View>
+ );
+ } else {
+ const iconName = nativeChatThreadListIcon === 'lock' ? 'lock' : 'server';
+ iconComponent = <Icon name={iconName} size={12} style={iconStyle} />;
+ }
+
const threadDetails = React.useMemo(
() => (
<View style={styles.threadDetails}>
<View style={styles.header}>
- <View style={styles.iconContainer}>
- <Icon name={iconName} size={12} style={iconStyle} />
- </View>
+ <View style={styles.iconContainer}>{iconComponent}</View>
<ThreadAncestorsLabel threadInfo={data.threadInfo} />
</View>
<View style={styles.row}>
@@ -160,9 +171,8 @@
</View>
),
[
- iconStyle,
+ iconComponent,
data.threadInfo,
- iconName,
lastActivity,
lastActivityStyle,
resolvedThreadInfo.uiName,
@@ -298,6 +308,15 @@
iconUnread: {
color: 'listForegroundLabel',
},
+ farcasterIcon: {
+ backgroundColor: '#855DCD',
+ borderRadius: 6,
+ width: 12,
+ height: 12,
+ justifyContent: 'center',
+ alignItems: 'center',
+ opacity: 0.7,
+ },
};
export { ChatThreadListItem, chatThreadListItemHeight, spacerHeight };
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
@@ -24,6 +24,7 @@
import css from './chat-thread-list.css';
import MessagePreview from './message-preview.react.js';
import ThreadAvatar from '../avatars/thread-avatar.react.js';
+import CommIcon from '../comm-icon.react.js';
import { useSelector } from '../redux/redux-utils.js';
import {
useOnClickThread,
@@ -132,8 +133,21 @@
threadSpecs[threadInfo.type].protocol().presentationDetails;
const iconClass = unread ? css.iconUnread : css.iconRead;
- const icon =
- presentationDetails.webChatThreadListIcon === 'lock' ? lock : server;
+ const webChatThreadListIcon = presentationDetails.webChatThreadListIcon;
+ let iconComponent;
+
+ if (webChatThreadListIcon === 'farcaster') {
+ iconComponent = <CommIcon icon="farcaster" size={12} color="#855DCD" />;
+ } else if (webChatThreadListIcon === 'lock') {
+ iconComponent = (
+ <FontAwesomeIcon size="xs" className={iconClass} icon={lock} />
+ );
+ } else {
+ iconComponent = (
+ <FontAwesomeIcon size="xs" className={iconClass} icon={server} />
+ );
+ }
+
const breadCrumbs = presentationDetails.threadAncestorLabel(ancestorPath);
return (
@@ -147,9 +161,7 @@
</div>
<div className={css.threadButton}>
<div className={css.header}>
- <div className={css.iconWrapper}>
- <FontAwesomeIcon size="xs" className={iconClass} icon={icon} />
- </div>
+ <div className={css.iconWrapper}>{iconComponent}</div>
<p className={breadCrumbsClassName}>{breadCrumbs}</p>
</div>
<div className={css.threadRow}>
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Sat, Dec 6, 7:11 PM (17 h, 8 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
5840310
Default Alt Text
D15376.1765048291.diff (5 KB)
Attached To
Mode
D15376: [native][web] Show the Farcaster icon next to Farcaster threads
Attached
Detach File
Event Timeline
Log In to Comment