From 95f77e2cdcbcfccac018bfb471f66038ff9988f8 Mon Sep 17 00:00:00 2001 From: overtake <> Date: Sun, 5 Apr 2020 11:27:00 +0400 Subject: [PATCH 1/2] no message --- submodules/Postbox/Sources/ChatListViewState.swift | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/submodules/Postbox/Sources/ChatListViewState.swift b/submodules/Postbox/Sources/ChatListViewState.swift index 2ad7c5fc25..ff89fd4725 100644 --- a/submodules/Postbox/Sources/ChatListViewState.swift +++ b/submodules/Postbox/Sources/ChatListViewState.swift @@ -215,7 +215,7 @@ private final class ChatListViewSpaceState { if let lastMessage = lowerOrAtAnchorMessages.min(by: { $0.entryIndex < $1.entryIndex }) { nextLowerIndex = lastMessage.entryIndex } else { - nextLowerIndex = resolvedAnchorIndex + nextLowerIndex = resolvedAnchorIndex.successor } let loadedLowerMessages = postbox.chatListTable.entries(groupId: groupId, from: (nextLowerIndex.index, nextLowerIndex.isMessage), to: (lowerBound.index, lowerBound.isMessage), peerChatInterfaceStateTable: postbox.peerChatInterfaceStateTable, count: self.halfLimit - lowerOrAtAnchorMessages.count, predicate: filterPredicate.flatMap { mappedChatListFilterPredicate(postbox: postbox, groupId: groupId, predicate: $0) }).map(mapEntry) lowerOrAtAnchorMessages.append(contentsOf: loadedLowerMessages) From 5280706c40959af73bc52ee5e82e2d4e8a960129 Mon Sep 17 00:00:00 2001 From: overtake <> Date: Sun, 5 Apr 2020 12:41:31 +0400 Subject: [PATCH 2/2] no message --- submodules/Postbox/Sources/ChatListViewState.swift | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/submodules/Postbox/Sources/ChatListViewState.swift b/submodules/Postbox/Sources/ChatListViewState.swift index ff89fd4725..60ebb52824 100644 --- a/submodules/Postbox/Sources/ChatListViewState.swift +++ b/submodules/Postbox/Sources/ChatListViewState.swift @@ -841,11 +841,11 @@ private struct MutableChatListEntryIndex: Hashable, Comparable { var isMessage: Bool var predecessor: MutableChatListEntryIndex { - return MutableChatListEntryIndex(index: self.index.predecessor, isMessage: true) + return MutableChatListEntryIndex(index: self.index.predecessor, isMessage: self.isMessage) } var successor: MutableChatListEntryIndex { - return MutableChatListEntryIndex(index: self.index.successor, isMessage: true) + return MutableChatListEntryIndex(index: self.index.successor, isMessage: self.isMessage) } static let absoluteLowerBound = MutableChatListEntryIndex(index: .absoluteLowerBound, isMessage: true)