From 45f27e611c092b63ae76a278fed5c2af4b6045ef Mon Sep 17 00:00:00 2001 From: ismailgulek Date: Mon, 6 Jun 2022 13:32:31 +0300 Subject: [PATCH] Fix further PR remarks --- .../View/AuthenticationChoosePasswordScreen.swift | 7 +------ .../View/AuthenticationForgotPasswordScreen.swift | 6 ++++-- .../Common/OnboardingBreakerScreenBackground.swift | 2 +- 3 files changed, 6 insertions(+), 9 deletions(-) diff --git a/RiotSwiftUI/Modules/Authentication/ChoosePassword/View/AuthenticationChoosePasswordScreen.swift b/RiotSwiftUI/Modules/Authentication/ChoosePassword/View/AuthenticationChoosePasswordScreen.swift index bfc000cbe..ff76409d6 100644 --- a/RiotSwiftUI/Modules/Authentication/ChoosePassword/View/AuthenticationChoosePasswordScreen.swift +++ b/RiotSwiftUI/Modules/Authentication/ChoosePassword/View/AuthenticationChoosePasswordScreen.swift @@ -71,12 +71,7 @@ struct AuthenticationChoosePasswordScreen: View { /// The text field and submit button where the user enters an email address. var form: some View { VStack(alignment: .leading, spacing: 12) { - if #available(iOS 15.0, *) { - textField - .onSubmit(submit) - } else { - textField - } + textField HStack(alignment: .center, spacing: 8) { Toggle(VectorL10n.authenticationChoosePasswordSignoutAllDevices, isOn: $viewModel.signoutAllDevices) diff --git a/RiotSwiftUI/Modules/Authentication/ForgotPassword/View/AuthenticationForgotPasswordScreen.swift b/RiotSwiftUI/Modules/Authentication/ForgotPassword/View/AuthenticationForgotPasswordScreen.swift index 4d04f159e..c290ebfb3 100644 --- a/RiotSwiftUI/Modules/Authentication/ForgotPassword/View/AuthenticationForgotPasswordScreen.swift +++ b/RiotSwiftUI/Modules/Authentication/ForgotPassword/View/AuthenticationForgotPasswordScreen.swift @@ -41,7 +41,8 @@ struct AuthenticationForgotPasswordScreen: View { if viewModel.viewState.hasSentEmail { waitingFooter - .padding(.bottom, geometry.safeAreaInsets.bottom > 0 ? 20 : 36) + .padding(.bottom, OnboardingMetrics.actionButtonBottomPadding) + .padding(.bottom, geometry.safeAreaInsets.bottom > 0 ? 0 : 16) .padding(.horizontal, 16) } } @@ -90,7 +91,7 @@ struct AuthenticationForgotPasswordScreen: View { /// The footer shown whilst waiting for the user to tap the link in the email. var waitingFooter: some View { - VStack(spacing: 14) { + VStack(spacing: 12) { Button(action: done) { Text(VectorL10n.done) } @@ -100,6 +101,7 @@ struct AuthenticationForgotPasswordScreen: View { Button { viewModel.send(viewAction: .resend) } label: { Text(VectorL10n.authenticationForgotPasswordWaitingButton) .font(theme.fonts.body) + .padding(.vertical, 12) .multilineTextAlignment(.center) } .accessibilityIdentifier("resendButton") diff --git a/RiotSwiftUI/Modules/Onboarding/Common/OnboardingBreakerScreenBackground.swift b/RiotSwiftUI/Modules/Onboarding/Common/OnboardingBreakerScreenBackground.swift index a2d80b098..39fd14915 100644 --- a/RiotSwiftUI/Modules/Onboarding/Common/OnboardingBreakerScreenBackground.swift +++ b/RiotSwiftUI/Modules/Onboarding/Common/OnboardingBreakerScreenBackground.swift @@ -32,7 +32,7 @@ struct OnboardingBreakerScreenBackground: View { } /// The background gradient used with light mode. - let gradient = Gradient (colors: Constants.gradientColors) + let gradient = Gradient(colors: Constants.gradientColors) init(_ isGradientEnabled: Bool = true) { self.isGradientEnabled = isGradientEnabled