mirror of
https://github.com/simplex-chat/simplex-chat.git
synced 2026-10-22 19:42:13 +00:00
core, tests, ui: keep member order with role index, skip down-migration schema comparison, reload support list on return with older remote hosts
This commit is contained in:
1 parent
2698b0e12d
commit
b7cce5513e
19 files changed
+127
-141
No files matched your search
@@ -592,10 +592,8 @@ private func processSendMessageCmd(toChatType: ChatType, cmd: ChatCommand) async
|
||||
} else {
|
||||
r = await chatApiSendCmd(cmd, bgDelay: msgDelay)
|
||||
if case let .result(.newChatItems(_, aChatItems)) = r {
|
||||
await MainActor.run {
|
||||
for aChatItem in aChatItems {
|
||||
chatModel.upsertSupportChatMember(aChatItem.chatInfo)
|
||||
}
|
||||
if let last = aChatItems.last {
|
||||
await MainActor.run { chatModel.upsertSupportChatMember(last.chatInfo) }
|
||||
}
|
||||
return aChatItems.map { $0.chatItem }
|
||||
}
|
||||
@@ -2062,10 +2060,10 @@ func apiLeaveGroup(_ groupId: Int64) async throws -> GroupInfo {
|
||||
}
|
||||
|
||||
// use ChatModel's loadGroupMembers from views
|
||||
func apiListMembers(_ groupId: Int64) async -> [GroupMember]? {
|
||||
func apiListMembers(_ groupId: Int64) async -> [GroupMember] {
|
||||
let r: APIResult<ChatResponse2> = await chatApiSendCmd(.apiListMembers(groupId: groupId))
|
||||
if case let .result(.groupMembers(_, group)) = r { return group.members }
|
||||
return nil
|
||||
return []
|
||||
}
|
||||
|
||||
func filterMembersToAdd(_ ms: [GMember]) -> [Contact] {
|
||||
|
||||
Reference in new issue
Block a user