ios: remove option to not show pending contact connections (#883)
This commit is contained in:
committed by
GitHub
parent
a5cdbc90f8
commit
9fdc2a4631
@@ -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)
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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")
|
||||
|
||||
Reference in New Issue
Block a user