diff --git a/ConversationsClassic/View/Main/Contacts/ContactsScreen.swift b/ConversationsClassic/View/Main/Contacts/ContactsScreen.swift index e2e0ff6..ba94f74 100644 --- a/ConversationsClassic/View/Main/Contacts/ContactsScreen.swift +++ b/ConversationsClassic/View/Main/Contacts/ContactsScreen.swift @@ -26,29 +26,25 @@ struct ContactsScreen: View { ) // Contacts list - contactsList - } - } - } - - @ViewBuilder private var contactsList: some View { - if !clientsStore.actualRosters.isEmpty { - List { - ForEach(elements.indices, id: \.self) { index in - let element = elements[index] - if let roster = element as? Roster { - ContactsScreenRow( - roster: roster - ) - } else if let bareJid = element as? String { - SharedSectionTitle(text: bareJid) + if !clientsStore.actualRosters.isEmpty { + List { + ForEach(elements.indices, id: \.self) { index in + let element = elements[index] + 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() } }