diff --git a/apps/ios/Shared/Views/ChatList/UserPicker.swift b/apps/ios/Shared/Views/ChatList/UserPicker.swift index 4309a4b4fd..6b3a8aafb4 100644 --- a/apps/ios/Shared/Views/ChatList/UserPicker.swift +++ b/apps/ios/Shared/Views/ChatList/UserPicker.swift @@ -19,6 +19,7 @@ struct UserPicker: View { @EnvironmentObject var m: ChatModel @Environment(\.scenePhase) var scenePhase @EnvironmentObject var theme: AppTheme + @Environment(\.colorScheme) var colorScheme @Binding var showSettings: Bool @Binding var showConnectDesktop: Bool @Binding var userPickerVisible: Bool @@ -84,6 +85,23 @@ struct UserPicker: View { showSettings = true userPickerVisible.toggle() } + + menuButton("Help", icon: "questionmark.circle") { + userPickerVisible.toggle() + } + + menuButton("Support", icon: "info.bubble") { + userPickerVisible.toggle() + } + + menuButton(nil, icon: colorScheme == .light ? "sun.max" : "moon.stars") { + if (colorScheme == .light) { + ThemeManager.applyTheme(systemDarkThemeDefault.get()) + } else { + ThemeManager.applyTheme(DefaultTheme.LIGHT.themeName) + } + userPickerVisible.toggle() + } } .padding(16) } @@ -170,15 +188,17 @@ struct UserPicker: View { } - private func menuButton(_ title: LocalizedStringKey, icon: String, action: @escaping () -> Void) -> some View { + private func menuButton(_ title: LocalizedStringKey?, icon: String, action: @escaping () -> Void) -> some View { Button(action: action) { HStack(spacing: verticalSpaceDefault) { Image(systemName: icon) .symbolRenderingMode(.monochrome) .foregroundColor(theme.colors.secondary) .frame(maxWidth: 20, maxHeight: 20) - Text(title) - .overlay(DetermineWidth()) + if let txt = title { + Text(txt) + .overlay(DetermineWidth()) + } Spacer() } .frame(height: 20)