From 78de092b0690fe6b13bf87c064736db1389b4bff Mon Sep 17 00:00:00 2001 From: fmodf Date: Sun, 20 Oct 2024 20:46:31 +0200 Subject: [PATCH] wip --- .../View/Main/Contacts/ContactsScreen.swift | 36 +++++++++---------- 1 file changed, 16 insertions(+), 20 deletions(-) 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() } }