Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Tap to reveal timestamps updates #789

Merged
merged 2 commits into from
Sep 20, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 8 additions & 7 deletions components/Chat/Message/Message.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -177,6 +177,9 @@ const ChatMessage = ({
const showTime = useRef<boolean>(false);
const showDateTime = useRef<boolean>(false);
const animateTime = useCallback(() => {
if (isAttachmentMessage()) {
return;
}
// For messages with date change
if (message.dateChange) {
showDateTime.current = !showDateTime.current;
Expand Down Expand Up @@ -445,13 +448,11 @@ const ChatMessage = ({
fromMe={message.fromMe}
/>
</TouchableOpacity>
<View
style={{
alignSelf: "flex-start",
}}
>
{messageContent}
</View>
<TouchableOpacity onPress={animateTime} activeOpacity={1}>
<View style={{ alignSelf: "flex-start" }}>
{messageContent}
</View>
</TouchableOpacity>
</View>
) : (
<View
Expand Down
Loading