ios: small fixes (#5712)

* ios: small fixes

* main thread

* fix crash

* fix member opening

* dismissing sheets in order

* theoretical fix of some crashes

---------

Co-authored-by: Evgeny Poberezkin <evgeny@poberezkin.com>
This commit is contained in:
Stanislav Dmitrenko 2025-03-06 17:31:05 +07:00 committed by GitHub
parent 7a3663f1e0
commit a3a27b250c
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
9 changed files with 29 additions and 22 deletions

View file

@ -341,9 +341,9 @@ func loadChat(chat: Chat, search: String = "", clearItems: Bool = true) async {
func loadChat(chatId: ChatId, search: String = "", openAroundItemId: ChatItem.ID? = nil, clearItems: Bool = true) async {
let m = ChatModel.shared
let im = ItemsModel.shared
m.chatItemStatuses = [:]
if clearItems {
await MainActor.run {
await MainActor.run {
m.chatItemStatuses = [:]
if clearItems {
im.reversedChatItems = []
ItemsModel.shared.chatItemsChangesListener.cleared()
}