Skip to content

Commit

Permalink
Cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
shilgapira committed Nov 11, 2024
1 parent 1a8310f commit 1042fef
Showing 1 changed file with 1 addition and 6 deletions.
7 changes: 1 addition & 6 deletions src/flows/FlowViewController.swift
Original file line number Diff line number Diff line change
Expand Up @@ -49,11 +49,6 @@ public class DescopeFlowViewController: UIViewController {
return flowView.state
}

public convenience init(preloading flow: DescopeFlow) {
self.init()
start(flow: flow)
}

public override func viewDidLoad() {
super.viewDidLoad()

Expand All @@ -76,7 +71,7 @@ public class DescopeFlowViewController: UIViewController {

public override func didMove(toParent parent: UIViewController?) {
super.didMove(toParent: parent)
if navigationController?.topViewController == self {
if let navigationController, navigationController.topViewController === self, navigationController.viewControllers.count == 1 {
navigationItem.leftBarButtonItem = UIBarButtonItem(barButtonSystemItem: .cancel, target: self, action: #selector(handleCancel))
} else {
navigationItem.leftBarButtonItem = nil
Expand Down

0 comments on commit 1042fef

Please sign in to comment.