[TF-1632] fix

This commit is contained in:
gmc 2024-10-09 22:53:00 +02:00 committed by gmachnio
parent bf4898bb86
commit 319ad4d263
6 changed files with 14 additions and 23 deletions

View File

@ -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

View File

@ -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))
}

View File

@ -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)

View File

@ -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
}

View File

@ -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)
}
}

View File

@ -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 {}