Follow-up

This commit is contained in:
Alexander Zinchuk 2022-06-01 00:40:03 +04:00
parent fa6fd018cb
commit 8483f5f73d
2 changed files with 3 additions and 3 deletions

View File

@ -47,7 +47,7 @@ import {
selectLocalAnimatedEmoji,
} from '../../selectors';
import {
getMessageContent, isUserId, isMessageLocal, getMessageText, checkIfHasUnreadReactions, getMessageOriginalId,
getMessageContent, isUserId, isMessageLocal, getMessageText, checkIfHasUnreadReactions,
} from '../../helpers';
import { onTickEnd } from '../../../util/schedulers';
import { updateUnreadReactions } from '../../reducers/reactions';
@ -665,7 +665,7 @@ function updateChatLastMessage(
if (currentLastMessage && !force) {
const isSameOrNewer = (
currentLastMessage.id === getMessageOriginalId(message)
currentLastMessage.id === message.id || currentLastMessage.id === message.previousLocalId
) || message.id > currentLastMessage.id;
if (!isSameOrNewer) {

View File

@ -311,7 +311,7 @@ export function selectFocusedMessageId(global: GlobalState, chatId: string) {
export function selectIsMessageFocused(global: GlobalState, message: ApiMessage) {
const focusedId = selectFocusedMessageId(global, message.chatId);
return focusedId ? focusedId === getMessageOriginalId(message) : false;
return focusedId ? focusedId === message.id || focusedId === message.previousLocalId : false;
}
export function selectIsMessageUnread(global: GlobalState, message: ApiMessage) {