Skip to content

Commit

Permalink
fix: indiviual to team migration disable dismiss and remove close but…
Browse files Browse the repository at this point in the history
…ton on last step - WPB-15044 (#2345)
  • Loading branch information
El-Fitz authored Jan 6, 2025
1 parent 775d653 commit 282d25e
Showing 1 changed file with 16 additions and 12 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -252,7 +252,7 @@ public class IndividualToTeamMigrationViewController: UIViewController {
onTransition: { @MainActor [weak self] in self?.transition(to: $0) }
)
childController.setViewControllers([vc], animated: true)
isModalInPresentation = false
isModalInPresentation = true
case .toCompletionDismiss:
analyticsFlowCompletionAction = nil
actionCallback(.completionDismiss)
Expand Down Expand Up @@ -351,17 +351,21 @@ private func hostedView(
.environment(\.wireTextStyleMapping, WireTextStyleMapping())
)
vc.title = step.title
vc.navigationItem.rightBarButtonItem = UIBarButtonItem.closeButton(
action: UIAction { _ in
switch step {
case .teamPlanSelection, .teamName, .confirmation:
transitionCallback(.toCancellationAlert)
case .completion:
transitionCallback(.toCompletionDismiss)
}
},
accessibilityLabel: step.closeButtonAccessibilityLabel
)
if case .completion = step {
vc.navigationItem.rightBarButtonItem = nil
} else {
vc.navigationItem.rightBarButtonItem = UIBarButtonItem.closeButton(
action: UIAction { _ in
switch step {
case .teamPlanSelection, .teamName, .confirmation:
transitionCallback(.toCancellationAlert)
case .completion:
transitionCallback(.toCompletionDismiss)
}
},
accessibilityLabel: step.closeButtonAccessibilityLabel
)
}
// Hide navigation bar title
vc.navigationItem.titleView = UIView()
vc.navigationItem.rightBarButtonItem?.tintColor = ColorTheme.Backgrounds.onBackground
Expand Down

0 comments on commit 282d25e

Please sign in to comment.