diff --git a/apps/ios/Shared/Views/Chat/ChatInfoView.swift b/apps/ios/Shared/Views/Chat/ChatInfoView.swift index 1945524973..3f2e3f8ffa 100644 --- a/apps/ios/Shared/Views/Chat/ChatInfoView.swift +++ b/apps/ios/Shared/Views/Chat/ChatInfoView.swift @@ -109,7 +109,9 @@ struct ChatInfoView: View { .navigationBarTitle("Contact preferences") .navigationBarTitleDisplayMode(.large) } label: { - Text("Contact preferences") + settingsRow("switch.2") { + Text("Contact preferences") + } } } diff --git a/apps/ios/Shared/Views/Chat/Group/GroupChatInfoView.swift b/apps/ios/Shared/Views/Chat/Group/GroupChatInfoView.swift index 288a30807f..d3028bb2e5 100644 --- a/apps/ios/Shared/Views/Chat/Group/GroupChatInfoView.swift +++ b/apps/ios/Shared/Views/Chat/Group/GroupChatInfoView.swift @@ -52,7 +52,9 @@ struct GroupChatInfoView: View { .navigationBarTitle("Group preferences") .navigationBarTitleDisplayMode(.large) } label: { - Text("Group preferences") + settingsRow("switch.2") { + Text("Group preferences") + } } } header: { Text("Preferences") diff --git a/apps/ios/Shared/Views/UserSettings/SettingsView.swift b/apps/ios/Shared/Views/UserSettings/SettingsView.swift index 7c9fb500e0..238664379f 100644 --- a/apps/ios/Shared/Views/UserSettings/SettingsView.swift +++ b/apps/ios/Shared/Views/UserSettings/SettingsView.swift @@ -89,10 +89,8 @@ struct SettingsView: View { ProfilePreview(profileOf: user) .padding(.leading, -8) } - .disabled(chatModel.chatRunning != true) incognitoRow() - .disabled(chatModel.chatRunning != true) NavigationLink { CreateLinkView(selection: .longTerm, viaNavLink: true) @@ -100,33 +98,17 @@ struct SettingsView: View { } label: { settingsRow("qrcode") { Text("Your SimpleX contact address") } } - .disabled(chatModel.chatRunning != true) - NavigationLink { - DatabaseView(showSettings: $showSettings, chatItemTTL: chatModel.chatItemTTL) - .navigationTitle("Your chat database") - } label: { - let color: Color = chatModel.chatDbEncrypted == false ? .orange : .secondary - settingsRow("internaldrive", color: color) { - HStack { - Text("Database passphrase & export") - Spacer() - if chatModel.chatRunning == false { - Image(systemName: "exclamationmark.octagon.fill").foregroundColor(.red) - } - } - } - } - } - - Section("Settings") { NavigationLink { PreferencesView(profile: user.profile, preferences: user.fullPreferences, currentPreferences: user.fullPreferences) .navigationTitle("Your preferences") } label: { - settingsRow("list.bullet") { Text("Chat preferences") } + settingsRow("switch.2") { Text("Chat preferences") } } - + } + .disabled(chatModel.chatRunning != true) + + Section("Settings") { NavigationLink { NotificationsView() .navigationTitle("Notifications") @@ -136,18 +118,32 @@ struct SettingsView: View { Text("Notifications") } } + .disabled(chatModel.chatRunning != true) + + NavigationLink { + NetworkAndServers() + .navigationTitle("Network & servers") + } label: { + settingsRow("externaldrive.connected.to.line.below") { Text("Network & servers") } + } + .disabled(chatModel.chatRunning != true) + NavigationLink { CallSettings() .navigationTitle("Your calls") } label: { settingsRow("video") { Text("Audio & video calls") } } + .disabled(chatModel.chatRunning != true) + NavigationLink { PrivacySettings() .navigationTitle("Your privacy") } label: { settingsRow("lock") { Text("Privacy & security") } } + .disabled(chatModel.chatRunning != true) + if UIApplication.shared.supportsAlternateIcons { NavigationLink { AppearanceSettings() @@ -155,15 +151,11 @@ struct SettingsView: View { } label: { settingsRow("sun.max") { Text("Appearance") } } + .disabled(chatModel.chatRunning != true) } - NavigationLink { - NetworkAndServers() - .navigationTitle("Network & servers") - } label: { - settingsRow("externaldrive.connected.to.line.below") { Text("Network & servers") } - } + + chatDatabaseRow() } - .disabled(chatModel.chatRunning != true) Section("Help") { NavigationLink { @@ -283,6 +275,24 @@ struct SettingsView: View { .padding(.leading, indent) } } + + private func chatDatabaseRow() -> some View { + NavigationLink { + DatabaseView(showSettings: $showSettings, chatItemTTL: chatModel.chatItemTTL) + .navigationTitle("Your chat database") + } label: { + let color: Color = chatModel.chatDbEncrypted == false ? .orange : .secondary + settingsRow("internaldrive", color: color) { + HStack { + Text("Database passphrase & export") + Spacer() + if chatModel.chatRunning == false { + Image(systemName: "exclamationmark.octagon.fill").foregroundColor(.red) + } + } + } + } + } private enum SettingsSheet: Identifiable { case incognitoInfo