From 9fdc2a4631224bdde48026899c572b13a7022b1a Mon Sep 17 00:00:00 2001 From: Evgeny Poberezkin <2769109+epoberezkin@users.noreply.github.com> Date: Wed, 3 Aug 2022 18:02:59 +0100 Subject: [PATCH] ios: remove option to not show pending contact connections (#883) --- apps/ios/Shared/Views/ChatList/ChatListView.swift | 9 ++------- apps/ios/Shared/Views/UserSettings/SettingsView.swift | 6 ------ 2 files changed, 2 insertions(+), 13 deletions(-) diff --git a/apps/ios/Shared/Views/ChatList/ChatListView.swift b/apps/ios/Shared/Views/ChatList/ChatListView.swift index 2aabdc0fb1..def0d4202f 100644 --- a/apps/ios/Shared/Views/ChatList/ChatListView.swift +++ b/apps/ios/Shared/Views/ChatList/ChatListView.swift @@ -14,7 +14,6 @@ struct ChatListView: View { // not really used in this view @State private var showSettings = false @State private var searchText = "" - @AppStorage(DEFAULT_PENDING_CONNECTIONS) private var pendingConnections = true var body: some View { let v = NavigationView { @@ -65,14 +64,10 @@ struct ChatListView: View { private func filteredChats() -> [Chat] { let s = searchText.trimmingCharacters(in: .whitespaces).localizedLowercase - return s == "" && pendingConnections + return s == "" ? chatModel.chats - : s == "" - ? chatModel.chats.filter { - pendingConnections || $0.chatInfo.chatType != .contactConnection - } : chatModel.chats.filter { - (pendingConnections || $0.chatInfo.chatType != .contactConnection) && + $0.chatInfo.chatType != .contactConnection && $0.chatInfo.chatViewName.localizedLowercase.contains(s) } } diff --git a/apps/ios/Shared/Views/UserSettings/SettingsView.swift b/apps/ios/Shared/Views/UserSettings/SettingsView.swift index 4a679c13af..dd2a592c4a 100644 --- a/apps/ios/Shared/Views/UserSettings/SettingsView.swift +++ b/apps/ios/Shared/Views/UserSettings/SettingsView.swift @@ -18,7 +18,6 @@ let appBuild = Bundle.main.object(forInfoDictionaryKey: "CFBundleVersion") as? let DEFAULT_SHOW_LA_NOTICE = "showLocalAuthenticationNotice" let DEFAULT_LA_NOTICE_SHOWN = "localAuthenticationNoticeShown" let DEFAULT_PERFORM_LA = "performLocalAuthentication" -let DEFAULT_PENDING_CONNECTIONS = "pendingConnections" let DEFAULT_WEBRTC_POLICY_RELAY = "webrtcPolicyRelay" let DEFAULT_PRIVACY_ACCEPT_IMAGES = "privacyAcceptImages" let DEFAULT_PRIVACY_LINK_PREVIEWS = "privacyLinkPreviews" @@ -32,7 +31,6 @@ let appDefaults: [String: Any] = [ DEFAULT_SHOW_LA_NOTICE: false, DEFAULT_LA_NOTICE_SHOWN: false, DEFAULT_PERFORM_LA: false, - DEFAULT_PENDING_CONNECTIONS: true, DEFAULT_WEBRTC_POLICY_RELAY: true, DEFAULT_PRIVACY_ACCEPT_IMAGES: true, DEFAULT_PRIVACY_LINK_PREVIEWS: true, @@ -53,7 +51,6 @@ struct SettingsView: View { @Environment(\.colorScheme) var colorScheme @EnvironmentObject var chatModel: ChatModel @Binding var showSettings: Bool - @AppStorage(DEFAULT_PENDING_CONNECTIONS) private var pendingConnections = true @AppStorage(DEFAULT_DEVELOPER_TOOLS) private var developerTools = false var body: some View { @@ -125,9 +122,6 @@ struct SettingsView: View { settingsRow("sun.max") { Text("Appearance") } } } - settingsRow("link") { - Toggle("Show pending connections", isOn: $pendingConnections) - } NavigationLink { NetworkAndServers() .navigationTitle("Network & servers")