Page Menu
Home
Phorge
Search
Configure Global Search
Log In
Files
F32188435
D8098.1765089103.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Flag For Later
Award Token
Size
1 KB
Referenced Files
None
Subscribers
None
D8098.1765089103.diff
View Options
diff --git a/native/chat/message-header.react.js b/native/chat/message-header.react.js
--- a/native/chat/message-header.react.js
+++ b/native/chat/message-header.react.js
@@ -1,5 +1,6 @@
// @flow
+import { useRoute } from '@react-navigation/native';
import * as React from 'react';
import { View } from 'react-native';
@@ -9,6 +10,7 @@
import type { DisplayType } from './timestamp.react.js';
import { Timestamp, timestampHeight } from './timestamp.react.js';
import { SingleLine } from '../components/single-line.react.js';
+import { MessageListRouteName } from '../navigation/route-names.js';
import { useStyles } from '../themes/colors.js';
import type { ChatMessageInfoItemWithHeight } from '../types/chat-types.js';
import { useShouldRenderAvatars } from '../utils/avatar-utils.js';
@@ -23,6 +25,7 @@
const { item, focused, display } = props;
const { creator, time } = item.messageInfo;
const { isViewer } = creator;
+ const route = useRoute();
const modalDisplay = display === 'modal';
const shouldShowUsername = !isViewer && (modalDisplay || item.startsCluster);
@@ -46,8 +49,18 @@
authorName = <SingleLine style={style}>{stringForUser}</SingleLine>;
}
+ // We only want to render the top-placed timestamp for a message if it's
+ // rendered in the message list, and not any separate screens (i.e.
+ // the MessageResultsScreen).
+ const presentedFromMessageList =
+ typeof route.params?.presentedFrom === 'string' &&
+ route.params.presentedFrom.startsWith(MessageListRouteName);
+
+ const messageInMessageList =
+ route.name === MessageListRouteName || presentedFromMessageList;
+
const timestamp =
- modalDisplay || item.startsConversation ? (
+ messageInMessageList && (modalDisplay || item.startsConversation) ? (
<Timestamp time={time} display={display} />
) : null;
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Sun, Dec 7, 6:31 AM (16 h, 41 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
5842886
Default Alt Text
D8098.1765089103.diff (1 KB)
Attached To
Mode
D8098: [native] Block TimeStamp from rendering in the pinned messages screen
Attached
Detach File
Event Timeline
Log In to Comment