Context Menu: Fix showing the read status (#5366)
This commit is contained in:
parent
4cd8da212c
commit
d0d7f307cc
@ -44,6 +44,7 @@ import {
|
||||
import {
|
||||
selectActiveDownloads,
|
||||
selectAllowedMessageActionsSlow,
|
||||
selectBot,
|
||||
selectCanForwardMessage,
|
||||
selectCanPlayAnimatedEmojis,
|
||||
selectCanScheduleUntilOnline,
|
||||
@ -747,10 +748,13 @@ export default memo(withGlobal<OwnProps>(
|
||||
|
||||
const userStatus = isPrivate ? selectUserStatus(global, chat.id) : undefined;
|
||||
const isOwn = isOwnMessage(message);
|
||||
const chatBot = chat && selectBot(global, chat.id);
|
||||
const isBot = Boolean(chatBot);
|
||||
const isMessageUnread = selectIsMessageUnread(global, message);
|
||||
const canLoadReadDate = Boolean(
|
||||
isPrivate
|
||||
&& isOwn
|
||||
&& !isBot
|
||||
&& !isMessageUnread
|
||||
&& readDateExpiresAt
|
||||
&& message.date > Date.now() / 1000 - readDateExpiresAt
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user