mirror of
https://github.com/danog/telegram-tt.git
synced 2025-01-22 05:11:55 +01:00
Message List: Fix redundant unread divider in new chats
This commit is contained in:
parent
b8cab81a73
commit
d7e6ebfe06
@ -596,13 +596,9 @@ export function selectFirstUnreadId(global: GlobalState, chatId: string, threadI
|
|||||||
: -1;
|
: -1;
|
||||||
|
|
||||||
function findAfterLastReadId(listIds: number[]) {
|
function findAfterLastReadId(listIds: number[]) {
|
||||||
if (!lastReadId) {
|
|
||||||
return listIds[0];
|
|
||||||
}
|
|
||||||
|
|
||||||
return listIds.find((id) => {
|
return listIds.find((id) => {
|
||||||
return (
|
return (
|
||||||
id > lastReadId
|
(!lastReadId || id > lastReadId)
|
||||||
&& byId[id]
|
&& byId[id]
|
||||||
&& (!byId[id].isOutgoing || byId[id].isFromScheduled)
|
&& (!byId[id].isOutgoing || byId[id].isFromScheduled)
|
||||||
&& id > lastReadServiceNotificationId
|
&& id > lastReadServiceNotificationId
|
||||||
|
Loading…
x
Reference in New Issue
Block a user