Comments: Fix skipping to last (#1551)

This commit is contained in:
Alexander Zinchuk 2021-11-19 03:22:27 +03:00
parent 04754af53a
commit 5d3ceb9e64

View File

@ -571,7 +571,8 @@ export function selectFirstUnreadId(global: GlobalState, chatId: string, threadI
}
} else {
const threadInfo = selectThreadInfo(global, chatId, threadId);
if (!threadInfo || threadInfo.lastMessageId === threadInfo.lastReadInboxMessageId) {
if (!threadInfo
|| (threadInfo.lastMessageId !== undefined && threadInfo.lastMessageId === threadInfo.lastReadInboxMessageId)) {
return undefined;
}
}