Skip to content

Commit

Permalink
Fix a NetP UI presentation issue.
Browse files Browse the repository at this point in the history
  • Loading branch information
samsymons committed Nov 25, 2023
1 parent 67f2437 commit 4479650
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions DuckDuckGo/VPNWaitlistViewController.swift
Original file line number Diff line number Diff line change
Expand Up @@ -122,9 +122,13 @@ extension VPNWaitlistViewController: WaitlistViewModelDelegate {
func waitlistViewModel(_ viewModel: WaitlistViewModel, didTriggerCustomAction action: WaitlistViewModel.ViewCustomAction) {
if action == .openNetworkProtectionInviteCodeScreen {
let networkProtectionViewController = NetworkProtectionRootViewController { [weak self] in
self?.navigationController?.popToRootViewController(animated: true)
let newRootViewController = NetworkProtectionRootViewController()
self?.navigationController?.pushViewController(newRootViewController, animated: true)
guard let self = self, let rootViewController = self.navigationController?.viewControllers.first else {
assertionFailure("Failed to show NetP status view")
return
}

let networkProtectionRootViewController = NetworkProtectionRootViewController()
self.navigationController?.setViewControllers([rootViewController, networkProtectionRootViewController], animated: true)
}

self.navigationController?.pushViewController(networkProtectionViewController, animated: true)
Expand Down

0 comments on commit 4479650

Please sign in to comment.