From c7bc2cc890fd4cc4381ed4d17e9ae9659fec9680 Mon Sep 17 00:00:00 2001 From: spaced4ndy <8711996+spaced4ndy@users.noreply.github.com> Date: Mon, 6 May 2024 12:43:54 +0400 Subject: [PATCH] remove onboarding buttons --- .../ios/Shared/Views/ChatList/ChatsView.swift | 48 +------------------ 1 file changed, 1 insertion(+), 47 deletions(-) diff --git a/apps/ios/Shared/Views/ChatList/ChatsView.swift b/apps/ios/Shared/Views/ChatList/ChatsView.swift index e15fec587c..5b6ffc8b26 100644 --- a/apps/ios/Shared/Views/ChatList/ChatsView.swift +++ b/apps/ios/Shared/Views/ChatList/ChatsView.swift @@ -31,19 +31,10 @@ struct ChatsView: View { } private var viewBody: some View { - VStack { - if chatModel.chats.isEmpty { - onboardingButtons() - } - chatsView - .scaleEffect(x: 1, y: oneHandUI ? -1 : 1, anchor: .center) - } - } - - private var chatsView: some View { VStack { chatList } + .scaleEffect(x: 1, y: oneHandUI ? -1 : 1, anchor: .center) .refreshable { AlertManager.shared.showAlert(Alert( title: Text("Reconnect servers?"), @@ -109,43 +100,6 @@ struct ChatsView: View { .foregroundColor(.accentColor) } - // TODO remove? - private func onboardingButtons() -> some View { - VStack(alignment: .trailing, spacing: 0) { - Path { p in - p.move(to: CGPoint(x: 8, y: 0)) - p.addLine(to: CGPoint(x: 16, y: 10)) - p.addLine(to: CGPoint(x: 0, y: 10)) - p.addLine(to: CGPoint(x: 8, y: 0)) - } - .fill(Color.accentColor) - .frame(width: 20, height: 10) - .padding(.trailing, 12) - - connectButton("Tap to start a new chat") { - newChatMenuOption = .newContact - } - - Spacer() - Text("You have no chats") - .foregroundColor(.secondary) - .frame(maxWidth: .infinity) - } - .padding(.trailing, 6) - .frame(maxHeight: .infinity) - } - - private func connectButton(_ label: LocalizedStringKey, action: @escaping () -> Void) -> some View { - Button(action: action) { - Text(label) - .padding(.vertical, 10) - .padding(.horizontal, 20) - } - .background(Color.accentColor) - .foregroundColor(.white) - .clipShape(RoundedRectangle(cornerRadius: 16)) - } - private func filteredChats() -> [Chat] { if let linkChatId = searchChatFilteredBySimplexLink { return chatModel.chats.filter { $0.id == linkChatId }