This commit is contained in:
fmodf 2024-10-20 20:46:31 +02:00
parent d6f08ca691
commit 78de092b06

View file

@ -26,29 +26,25 @@ struct ContactsScreen: View {
) )
// Contacts list // Contacts list
contactsList if !clientsStore.actualRosters.isEmpty {
} List {
} ForEach(elements.indices, id: \.self) { index in
} let element = elements[index]
if let roster = element as? Roster {
@ViewBuilder private var contactsList: some View { ContactsScreenRow(
if !clientsStore.actualRosters.isEmpty { roster: roster
List { )
ForEach(elements.indices, id: \.self) { index in } else if let bareJid = element as? String {
let element = elements[index] SharedSectionTitle(text: bareJid)
if let roster = element as? Roster { }
ContactsScreenRow( }
roster: roster
)
} else if let bareJid = element as? String {
SharedSectionTitle(text: bareJid)
} }
.listStyle(.plain)
.background(Color.Material.Background.light)
} else {
Spacer()
} }
} }
.listStyle(.plain)
.background(Color.Material.Background.light)
} else {
Spacer()
} }
} }