fix: confirm email and resend email scene in Dark Mode

This commit is contained in:
sunxiaojian 2021-04-25 03:02:31 -07:00
parent 491448e753
commit cd77afe4a1
5 changed files with 12 additions and 17 deletions

View File

@ -206,7 +206,7 @@ import SwiftUI
struct MastodonConfirmEmailViewController_Previews: PreviewProvider {
static var previews: some View {
static var controls: some View {
UIViewControllerPreview {
let viewController = MastodonConfirmEmailViewController()
return viewController
@ -214,6 +214,13 @@ struct MastodonConfirmEmailViewController_Previews: PreviewProvider {
.previewLayout(.fixed(width: 375, height: 800))
}
static var previews: some View {
Group {
controls.colorScheme(.light)
controls.colorScheme(.dark)
}
}
}
#endif

View File

@ -56,9 +56,6 @@ final class MastodonPickServerViewController: UIViewController, NeedsDependency
extension MastodonPickServerViewController {
override var preferredStatusBarStyle: UIStatusBarStyle {
return .darkContent
}
override func viewDidLoad() {
super.viewDidLoad()

View File

@ -238,10 +238,6 @@ final class MastodonRegisterViewController: UIViewController, NeedsDependency, O
extension MastodonRegisterViewController {
override var preferredStatusBarStyle: UIStatusBarStyle {
return .darkContent
}
override func viewDidLoad() {
super.viewDidLoad()

View File

@ -41,13 +41,9 @@ final class MastodonResendEmailViewController: UIViewController, NeedsDependency
extension MastodonResendEmailViewController {
override var preferredStatusBarStyle: UIStatusBarStyle {
return .darkContent
}
override func viewDidLoad() {
super.viewDidLoad()
setupOnboardingAppearance()
navigationItem.leftBarButtonItem = UIBarButtonItem(barButtonSystemItem: .cancel, target: self, action: #selector(MastodonResendEmailViewController.cancelBarButtonItemPressed(_:)))
webView.translatesAutoresizingMaskIntoConstraints = false
@ -72,3 +68,6 @@ extension MastodonResendEmailViewController {
dismiss(animated: true, completion: nil)
}
}
// MARK: - OnboardingViewControllerAppearance
extension MastodonResendEmailViewController: OnboardingViewControllerAppearance { }

View File

@ -64,10 +64,6 @@ final class WelcomeViewController: UIViewController, NeedsDependency {
extension WelcomeViewController {
override var preferredStatusBarStyle: UIStatusBarStyle {
return .darkContent
}
override func viewDidLoad() {
super.viewDidLoad()