diff --git a/apps/ios/Shared/Views/Home/HomeView.swift b/apps/ios/Shared/Views/Home/HomeView.swift index ecd1101583..75837040e3 100644 --- a/apps/ios/Shared/Views/Home/HomeView.swift +++ b/apps/ios/Shared/Views/Home/HomeView.swift @@ -61,15 +61,16 @@ struct HomeView: View { case .chats: withToolbar("Chats", chatListView) } } - - ToolbarView { - settingsButton() - Spacer() - contactsButton() - Spacer() - chatsButton() - Spacer() - newChatButton() + .toolbar { + ToolbarItemGroup(placement: .bottomBar) { + settingsButton() + Spacer() + contactsButton() + Spacer() + chatsButton() + Spacer() + newChatButton() + } } if #unavailable(iOS 16) { @@ -223,40 +224,6 @@ struct HomeView: View { } } -extension Notification.Name { - static let toolbarVisibilityChanged = Notification.Name("toolbarVisibilityChanged") -} - -struct ToolbarView: View { - @State var isVisible: Bool = true; - let content: Content - - init(@ViewBuilder content: () -> Content) { - self.content = content() - } - - var body: some View { - VStack { - Spacer() - if isVisible { - VStack {} - .toolbar { - ToolbarItemGroup(placement: .bottomBar) { - content - } - } - } - } - .onReceive(NotificationCenter.default.publisher(for: .toolbarVisibilityChanged)) { notification in - if let visibility = notification.object as? Bool { - if isVisible != visibility { - isVisible.toggle() - } - } - } - } -} - #Preview { HomeView(showSettings: Binding.constant(false)) -} +} \ No newline at end of file