diff options
author | marinofaggiana <ios@nextcloud.com> | 2022-08-02 19:51:01 +0300 |
---|---|---|
committer | marinofaggiana <ios@nextcloud.com> | 2022-08-02 19:51:01 +0300 |
commit | c939a4970e4c3014bfebb295651c5d786803267e (patch) | |
tree | e885d5879745b563b7545898aa68a3362348db04 /iOSClient | |
parent | c79ca138f5db0a95cfd8f336c937fe286dda51aa (diff) |
test
Signed-off-by: marinofaggiana <ios@nextcloud.com>
Diffstat (limited to 'iOSClient')
-rw-r--r-- | iOSClient/Main/NCFunctionCenter.swift | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/iOSClient/Main/NCFunctionCenter.swift b/iOSClient/Main/NCFunctionCenter.swift index a075e346e..8ec067f86 100644 --- a/iOSClient/Main/NCFunctionCenter.swift +++ b/iOSClient/Main/NCFunctionCenter.swift @@ -458,11 +458,13 @@ import Photos var topNavigationController: UINavigationController? var pushServerUrl = NCUtilityFileSystem.shared.getHomeServer(account: appDelegate.account) + var mostViewController = UIApplication.shared.keyWindow!.rootViewController!.topMostViewController() - let mostViewController = UIApplication.shared.keyWindow!.rootViewController!.topMostViewController() - let isPresented = mostViewController.presentedViewController - - appDelegate.activeViewController?.navigationController?.popToRootViewController(animated: false) + if mostViewController.isModal { + mostViewController.dismiss(animated: false) + mostViewController = UIApplication.shared.keyWindow!.rootViewController!.topMostViewController() + } + mostViewController.navigationController?.popToRootViewController(animated: false) if let tabBarController = appDelegate.window?.rootViewController as? UITabBarController { tabBarController.selectedIndex = 0 |