diff --git a/ElementX/Sources/Screens/SessionVerification/SessionVerificationViewModel.swift b/ElementX/Sources/Screens/SessionVerification/SessionVerificationViewModel.swift index 9c2776fbcf..d1c60337c2 100644 --- a/ElementX/Sources/Screens/SessionVerification/SessionVerificationViewModel.swift +++ b/ElementX/Sources/Screens/SessionVerification/SessionVerificationViewModel.swift @@ -107,7 +107,9 @@ class SessionVerificationViewModel: SessionVerificationViewModelType, SessionVer case (_, .cancel, .cancelling): self.cancelVerification() case (_, _, .verified): - DispatchQueue.main.asyncAfter(deadline: .now() + 2) { + // Dismiss the success screen automatically. + Task { + try await Task.sleep(for: .seconds(2)) self.callback?(.finished) } default: diff --git a/ElementX/Sources/Screens/Settings/View/SettingsScreen.swift b/ElementX/Sources/Screens/Settings/View/SettingsScreen.swift index c52c502df9..bdf100deb8 100644 --- a/ElementX/Sources/Screens/Settings/View/SettingsScreen.swift +++ b/ElementX/Sources/Screens/Settings/View/SettingsScreen.swift @@ -42,15 +42,6 @@ struct SettingsScreen: View { signOutSection .listRowBackground(rowBackgroundColor) - -// analyticsSection -// .listRowBackground(rowBackgroundColor) -// -// userInterfaceSection -// .listRowBackground(rowBackgroundColor) -// -// logoutSection -// .listRowBackground(rowBackgroundColor) } .introspectTableView { tableView in tableView.backgroundColor = .clear @@ -160,76 +151,6 @@ struct SettingsScreen: View { .padding(.top, 24) } } - - private var analyticsSection: some View { - Section { - Button { context.send(viewAction: .reportBug) } label: { - HStack { - Text(ElementL10n.sendBugReport) - Spacer() - Image(systemName: "chevron.forward") - .foregroundColor(.element.tertiaryContent) - } - } - .listRowInsets(listRowInsets) - .listRowSeparator(.hidden) - .foregroundColor(.element.primaryContent) - .accessibilityIdentifier("reportBugButton") - } - } - - @ViewBuilder - private var userInterfaceSection: some View { - Section { - Picker(ElementL10n.settingsTimelineStyle, selection: $settings.timelineStyle) { - ForEach(TimelineStyle.allCases, id: \.self) { style in - Text(style.description) - .tag(style) - } - } - .listRowInsets(listRowInsets) - .accessibilityIdentifier("timelineStylePicker") - } - } - - private var logoutSection: some View { - Section { - Button { showingLogoutConfirmation = true } label: { - HStack { - Image(systemName: "rectangle.portrait.and.arrow.right") - .foregroundColor(.element.systemGray) - .padding(4) - .background(Color.element.systemGray6) - .clipShape(Circle()) - .frame(width: menuIconSize, height: menuIconSize) - Text(ElementL10n.actionSignOut) - Spacer() - Image(systemName: "chevron.forward") - .foregroundColor(.element.tertiaryContent) - } - } - .listRowInsets(listRowInsets) - .foregroundColor(.element.primaryContent) - .accessibilityIdentifier("logoutButton") - .alert(ElementL10n.actionSignOut, - isPresented: $showingLogoutConfirmation) { - Button(ElementL10n.actionSignOut, - role: .destructive, - action: logout) - } message: { - Text(ElementL10n.actionSignOutConfirmationSimple) - } - } footer: { - VStack { - versionText - .frame(maxWidth: .infinity) - - if let deviceId = context.viewState.deviceID { - Text(deviceId) - } - } - } - } private var closeButton: some View { Button(ElementL10n.actionCancel, action: close)