-
Notifications
You must be signed in to change notification settings - Fork 336
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
19 changed files
with
903 additions
and
65 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
47 changes: 47 additions & 0 deletions
47
ios/MullvadVPN/Coordinators/App/AccountDeletionCoordinator.swift
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
// | ||
// AccountDeletionCoordinator.swift | ||
// MullvadVPN | ||
// | ||
// Created by Mojgan on 2023-07-13. | ||
// Copyright © 2023 Mullvad VPN AB. All rights reserved. | ||
// | ||
|
||
import Foundation | ||
import UIKit | ||
|
||
final class AccountDeletionCoordinator: Coordinator, Presentable { | ||
private let navigationController: UINavigationController | ||
private let interactor: AccountDeletionInteractor | ||
|
||
var didCancel: ((AccountDeletionCoordinator) -> Void)? | ||
var didFinish: ((AccountDeletionCoordinator) -> Void)? | ||
|
||
var presentedViewController: UIViewController { | ||
navigationController | ||
} | ||
|
||
init( | ||
navigationController: UINavigationController, | ||
interactor: AccountDeletionInteractor | ||
) { | ||
self.navigationController = navigationController | ||
self.interactor = interactor | ||
} | ||
|
||
func start() { | ||
navigationController.navigationBar.isHidden = true | ||
let viewController = AccountDeletionViewController(interactor: interactor) | ||
viewController.delegate = self | ||
navigationController.pushViewController(viewController, animated: true) | ||
} | ||
} | ||
|
||
extension AccountDeletionCoordinator: AccountDeletionViewControllerDelegate { | ||
func deleteAccountDidSucceed(controller: AccountDeletionViewController) { | ||
didFinish?(self) | ||
} | ||
|
||
func deleteAccountDidCancel(controller: AccountDeletionViewController) { | ||
didCancel?(self) | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.