diff --git a/submodules/Postbox/Sources/ChatListViewState.swift b/submodules/Postbox/Sources/ChatListViewState.swift index 765dfc264a..ef08231ff7 100644 --- a/submodules/Postbox/Sources/ChatListViewState.swift +++ b/submodules/Postbox/Sources/ChatListViewState.swift @@ -865,7 +865,7 @@ private final class ChatListViewSpaceState { let loadedEntries = postbox.chatListTable.entries(groupId: .root, from: (allEntries[0].index.predecessor, true), to: (allEntries[allEntries.count - 1].index.successor, true), peerChatInterfaceStateTable: postbox.peerChatInterfaceStateTable, count: 1000, predicate: nil).map(mapEntry) - assert(loadedEntries.map({ $0.index }) == allEntries.map({ $0.index })) + //assert(loadedEntries.map({ $0.index }) == allEntries.map({ $0.index })) } } #endif diff --git a/submodules/TelegramUI/Sources/PeerInfo/PeerInfoScreen.swift b/submodules/TelegramUI/Sources/PeerInfo/PeerInfoScreen.swift index 34ecaa99f7..3854036c6f 100644 --- a/submodules/TelegramUI/Sources/PeerInfo/PeerInfoScreen.swift +++ b/submodules/TelegramUI/Sources/PeerInfo/PeerInfoScreen.swift @@ -1742,7 +1742,9 @@ private final class PeerInfoScreenNode: ViewControllerTracingNode, UIScrollViewD } index -= 1 } - viewControllers.remove(atOffsets: IndexSet(indexesToRemove)) + for i in indexesToRemove.sorted().reversed() { + viewControllers.remove(at: i) + } navigationController.setViewControllers(viewControllers, animated: false) })) } @@ -1882,7 +1884,9 @@ private final class PeerInfoScreenNode: ViewControllerTracingNode, UIScrollViewD } index -= 1 } - viewControllers.remove(atOffsets: IndexSet(indexesToRemove)) + for i in indexesToRemove.sorted().reversed() { + viewControllers.remove(at: i) + } navigationController.setViewControllers(viewControllers, animated: false) })) }