mirror of
https://github.com/twofas/2fas-ios.git
synced 2024-11-22 02:10:19 +01:00
[TF-1632] fix
This commit is contained in:
parent
bf4898bb86
commit
319ad4d263
@ -148,10 +148,14 @@ extension MainFlowController: MainFlowControlling {
|
||||
|
||||
extension MainFlowController: ImporterOpenFileHeadlessFlowControllerParent {
|
||||
func importerCloseOnSucessfulImport() {
|
||||
|
||||
handleImporterClose()
|
||||
}
|
||||
|
||||
func importerClose() {
|
||||
handleImporterClose()
|
||||
}
|
||||
|
||||
private func handleImporterClose() {
|
||||
viewController.dismiss(animated: true) { [weak self] in
|
||||
NotificationCenter.default.post(name: .servicesWereUpdated, object: nil)
|
||||
self?.importer = nil
|
||||
|
@ -182,11 +182,7 @@ extension MainSplitFlowController: TokensPlainFlowControllerParent {
|
||||
}
|
||||
}
|
||||
|
||||
extension MainSplitFlowController: SettingsFlowControllerParent {
|
||||
func switchToMainOnSuccessfulImport() {
|
||||
viewController.tabBar?.presenter.handleDidSelectViewPath(.main)
|
||||
}
|
||||
|
||||
extension MainSplitFlowController: SettingsFlowControllerParent {
|
||||
func settingsToUpdateCurrentPosition(_ viewPath: ViewPath.Settings?) {
|
||||
viewController.presenter.handlePathWasUpdated(to: .settings(option: viewPath))
|
||||
}
|
||||
|
@ -76,10 +76,6 @@ extension MainTabFlowController: MainTabFlowControlling {
|
||||
}
|
||||
|
||||
extension MainTabFlowController: SettingsFlowControllerParent {
|
||||
func switchToMainOnSuccessfulImport() {
|
||||
parent?.tabToTokens()
|
||||
}
|
||||
|
||||
func settingsToUpdateCurrentPosition(_ viewPath: ViewPath.Settings?) {
|
||||
parent?.tabNavigatedToViewPath(.settings(option: viewPath))
|
||||
viewController.presenter.handleSettingsChangedViewPath(viewPath)
|
||||
|
@ -92,10 +92,14 @@ extension BackupMenuFlowController: BackupMenuFlowControlling {
|
||||
|
||||
extension BackupMenuFlowController: ImporterOpenFileHeadlessFlowControllerParent {
|
||||
func importerCloseOnSucessfulImport() {
|
||||
|
||||
handleImporterClose()
|
||||
}
|
||||
|
||||
func importerClose() {
|
||||
handleImporterClose()
|
||||
}
|
||||
|
||||
private func handleImporterClose() {
|
||||
viewController.dismiss(animated: true) { [weak self] in
|
||||
self?.importer = nil
|
||||
}
|
||||
|
@ -20,9 +20,7 @@
|
||||
import UIKit
|
||||
import Common
|
||||
|
||||
protocol ExternalImportFlowControllerParent: AnyObject {
|
||||
func switchToMainOnSucessfulImport()
|
||||
}
|
||||
protocol ExternalImportFlowControllerParent: AnyObject {}
|
||||
|
||||
protocol ExternalImportFlowControlling: AnyObject {
|
||||
func toAegis()
|
||||
@ -195,8 +193,7 @@ extension ExternalImportFlowController: ImporterOpenFileHeadlessFlowControllerPa
|
||||
navigationController?.tabBarController?.tabBar.isHidden = false
|
||||
importer = nil
|
||||
navigationController?.dismiss(animated: true) { [weak self] in
|
||||
self?.navigationController?.popToRootViewController(animated: false)
|
||||
self?.parent?.switchToMainOnSucessfulImport()
|
||||
self?.navigationController?.popToRootViewController(animated: true)
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -24,7 +24,6 @@ import Data
|
||||
protocol SettingsFlowControllerParent: AnyObject {
|
||||
func settingsToUpdateCurrentPosition(_ viewPath: ViewPath.Settings?)
|
||||
func settingsToRevealMenu()
|
||||
func switchToMainOnSuccessfulImport()
|
||||
}
|
||||
|
||||
protocol SettingsFlowControlling: AnyObject {
|
||||
@ -252,10 +251,5 @@ extension SettingsFlowController: AppleWatchFlowControllerParent {
|
||||
extension SettingsFlowController: TrashFlowControllerParent {}
|
||||
extension SettingsFlowController: BrowserExtensionMainFlowControllerParent {}
|
||||
extension SettingsFlowController: AboutFlowControllerParent {}
|
||||
extension SettingsFlowController: ExternalImportFlowControllerParent {
|
||||
func switchToMainOnSucessfulImport() {
|
||||
viewController.presenter.handleShowingRootMenu()
|
||||
parent?.switchToMainOnSuccessfulImport()
|
||||
}
|
||||
}
|
||||
extension SettingsFlowController: ExternalImportFlowControllerParent {}
|
||||
extension SettingsFlowController: AppearanceFlowControllerParent {}
|
||||
|
Loading…
Reference in New Issue
Block a user