mirror of
https://github.com/simplex-chat/simplex-chat.git
synced 2024-12-17 17:20:21 +01:00
ios: ChatView performance improvements (#4353)
* feat: Add synthesized hashable conformance to chat and API types (#4348) * UIKit ReverseList * ReverseList - manual layout updates for external state * Propagate ScrollModel; Disable async media width * Filter chat items * Remove UIKit menu wrapper * Make chat item width calculation synchronous (#4371) * Fix floating button regression * Improve filter performance * Fix page load the merged items exceed full page * Resolve iOS15 compabibility * Restore build config * Add page-up scroll; Fix same item decrementing unread counter multiple times * Fix: Chat not loading additional pages, if newest items are all merged and exceed page size * Minor * Fix item loading regression * Fix item loading regression 2 * Fix unread regression * refactor --------- Co-authored-by: Arturs Krumins <auth@levitatingpineapple.com> Co-authored-by: Levitating Pineapple <noreply@levitatingpineapple.com> Co-authored-by: spaced4ndy <8711996+spaced4ndy@users.noreply.github.com>
This commit is contained in:
committed by
GitHub
parent
e22e01acd2
commit
2585f4ecfd
@@ -309,8 +309,10 @@ private func apiChatsResponse(_ r: ChatResponse) throws -> [ChatData] {
|
||||
throw r
|
||||
}
|
||||
|
||||
let loadItemsPerPage = 50
|
||||
|
||||
func apiGetChat(type: ChatType, id: Int64, search: String = "") throws -> Chat {
|
||||
let r = chatSendCmdSync(.apiGetChat(type: type, id: id, pagination: .last(count: 50), search: search))
|
||||
let r = chatSendCmdSync(.apiGetChat(type: type, id: id, pagination: .last(count: loadItemsPerPage), search: search))
|
||||
if case let .apiChat(_, chat) = r { return Chat.init(chat) }
|
||||
throw r
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user