mirror of
https://github.com/danog/telegram-tt.git
synced 2024-11-30 04:39:00 +01:00
Follow-up
This commit is contained in:
parent
fa6fd018cb
commit
8483f5f73d
@ -47,7 +47,7 @@ import {
|
|||||||
selectLocalAnimatedEmoji,
|
selectLocalAnimatedEmoji,
|
||||||
} from '../../selectors';
|
} from '../../selectors';
|
||||||
import {
|
import {
|
||||||
getMessageContent, isUserId, isMessageLocal, getMessageText, checkIfHasUnreadReactions, getMessageOriginalId,
|
getMessageContent, isUserId, isMessageLocal, getMessageText, checkIfHasUnreadReactions,
|
||||||
} from '../../helpers';
|
} from '../../helpers';
|
||||||
import { onTickEnd } from '../../../util/schedulers';
|
import { onTickEnd } from '../../../util/schedulers';
|
||||||
import { updateUnreadReactions } from '../../reducers/reactions';
|
import { updateUnreadReactions } from '../../reducers/reactions';
|
||||||
@ -665,7 +665,7 @@ function updateChatLastMessage(
|
|||||||
|
|
||||||
if (currentLastMessage && !force) {
|
if (currentLastMessage && !force) {
|
||||||
const isSameOrNewer = (
|
const isSameOrNewer = (
|
||||||
currentLastMessage.id === getMessageOriginalId(message)
|
currentLastMessage.id === message.id || currentLastMessage.id === message.previousLocalId
|
||||||
) || message.id > currentLastMessage.id;
|
) || message.id > currentLastMessage.id;
|
||||||
|
|
||||||
if (!isSameOrNewer) {
|
if (!isSameOrNewer) {
|
||||||
|
@ -311,7 +311,7 @@ export function selectFocusedMessageId(global: GlobalState, chatId: string) {
|
|||||||
export function selectIsMessageFocused(global: GlobalState, message: ApiMessage) {
|
export function selectIsMessageFocused(global: GlobalState, message: ApiMessage) {
|
||||||
const focusedId = selectFocusedMessageId(global, message.chatId);
|
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) {
|
export function selectIsMessageUnread(global: GlobalState, message: ApiMessage) {
|
||||||
|
Loading…
Reference in New Issue
Block a user