Message List: Fix incorrect position on opening (#3283)
This commit is contained in:
parent
e880d83377
commit
60d924e5a0
@ -755,16 +755,11 @@ export function selectRealLastReadId<T extends GlobalState>(global: T, chatId: s
|
|||||||
return undefined;
|
return undefined;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!chat.lastMessage) {
|
if (!chat.lastMessage || chat.unreadCount) {
|
||||||
return chat.lastReadInboxMessageId;
|
return chat.lastReadInboxMessageId;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (isMessageLocal(chat.lastMessage)) {
|
return chat.lastMessage.id;
|
||||||
return chat.lastMessage.id;
|
|
||||||
}
|
|
||||||
|
|
||||||
// Some previously read messages may be deleted
|
|
||||||
return Math.min(chat.lastMessage.id, chat.lastReadInboxMessageId);
|
|
||||||
} else {
|
} else {
|
||||||
const threadInfo = selectThreadInfo(global, chatId, threadId);
|
const threadInfo = selectThreadInfo(global, chatId, threadId);
|
||||||
if (!threadInfo) {
|
if (!threadInfo) {
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user