ui: exclude not ready and active contacts from list of contacts to add to group (e.g. simplex team contact) (#3737)

This commit is contained in:
spaced4ndy
2024-01-24 13:56:38 +04:00
committed by GitHub
parent 838a759a76
commit da9a7f4642
2 changed files with 2 additions and 2 deletions

View File

@@ -1172,7 +1172,7 @@ func filterMembersToAdd(_ ms: [GMember]) -> [Contact] {
let memberContactIds = ms.compactMap{ m in m.wrapped.memberCurrent ? m.wrapped.memberContactId : nil }
return ChatModel.shared.chats
.compactMap{ $0.chatInfo.contact }
.filter{ !memberContactIds.contains($0.apiId) }
.filter{ c in c.ready && c.active && !memberContactIds.contains(c.apiId) }
.sorted{ $0.displayName.lowercased() < $1.displayName.lowercased() }
}