Use Message received_at_ms to hide typing bubble

This commit is contained in:
ayumi-signal 2023-11-03 17:55:12 -07:00 committed by GitHub
parent a2cfaa81a4
commit dca32747db
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 4 additions and 2 deletions

View file

@ -221,6 +221,7 @@ export type PropsData = {
isSpoilerExpanded?: Record<number, boolean>;
direction: DirectionType;
timestamp: number;
receivedAtMS?: number;
status?: MessageStatusType;
contact?: EmbeddedContactType;
author: Pick<

View file

@ -764,6 +764,7 @@ export const getPropsForMessage = (
text: message.body,
textDirection: getTextDirection(message.body),
timestamp: getMessageSentTimestamp(message, { includeEdits: true, log }),
receivedAtMS: message.received_at_ms,
};
};

View file

@ -44,8 +44,8 @@ export function SmartTypingBubble({
if ('author' in lastItem.data) {
lastItemAuthorId = lastItem.data.author?.id;
}
if ('timestamp' in lastItem.data) {
lastItemTimestamp = lastItem.data.timestamp;
if ('receivedAtMS' in lastItem.data) {
lastItemTimestamp = lastItem.data.receivedAtMS;
}
}