From fc8aee5d5eab8ddf8ee8e4ee94b02c75bf0ef964 Mon Sep 17 00:00:00 2001 From: Niels Andriesse Date: Thu, 12 Dec 2019 16:11:54 +1100 Subject: [PATCH] Clean --- Signal/src/Loki/Redesign/View Controllers/LandingVC.swift | 7 +++++++ .../Registration/OnboardingController.swift | 6 +++--- 2 files changed, 10 insertions(+), 3 deletions(-) diff --git a/Signal/src/Loki/Redesign/View Controllers/LandingVC.swift b/Signal/src/Loki/Redesign/View Controllers/LandingVC.swift index 622130e48..b8d8cf678 100644 --- a/Signal/src/Loki/Redesign/View Controllers/LandingVC.swift +++ b/Signal/src/Loki/Redesign/View Controllers/LandingVC.swift @@ -99,6 +99,13 @@ final class LandingVC : UIViewController, LinkDeviceVCDelegate, DeviceLinkingMod view.addSubview(mainStackView) mainStackView.pin(to: view) topSpacer.heightAnchor.constraint(equalTo: bottomSpacer.heightAnchor, multiplier: 1).isActive = true + // Show device unlinked alert if needed + if UserDefaults.standard.bool(forKey: "wasUnlinked") { + let alert = UIAlertController(title: NSLocalizedString("Device Unlinked", comment: ""), message: NSLocalizedString("Your device was unlinked successfully", comment: ""), preferredStyle: .alert) + alert.addAction(UIAlertAction(title: NSLocalizedString("OK", comment: ""), accessibilityIdentifier: nil, style: .default, handler: nil)) + present(alert, animated: true, completion: nil) + UserDefaults.removeAll() + } } override func viewDidDisappear(_ animated: Bool) { diff --git a/Signal/src/ViewControllers/Registration/OnboardingController.swift b/Signal/src/ViewControllers/Registration/OnboardingController.swift index bee26af63..d7ce7a46d 100644 --- a/Signal/src/ViewControllers/Registration/OnboardingController.swift +++ b/Signal/src/ViewControllers/Registration/OnboardingController.swift @@ -116,9 +116,9 @@ public class OnboardingController: NSObject { } public func pushSeedVC(from viewController: UIViewController) { - AssertIsOnMainThread() - let seedVC = SeedVC(onboardingController: self) - viewController.navigationController?.pushViewController(seedVC, animated: true) +// AssertIsOnMainThread() +// let seedVC = SeedVC(onboardingController: self) +// viewController.navigationController?.pushViewController(seedVC, animated: true) } public func pushDisplayNameVC(from viewController: UIViewController) {