diff options
author | marinofaggiana <ios@nextcloud.com> | 2022-08-02 18:51:25 +0300 |
---|---|---|
committer | marinofaggiana <ios@nextcloud.com> | 2022-08-02 18:51:25 +0300 |
commit | ef0090cfd241e22590cc00d74dfbf4226a07d578 (patch) | |
tree | 09d6c49fcd4ed83905116aa3a3f17614f8720a9a | |
parent | 1951f444f44faceebe197bb85e3a70a56e4fbad6 (diff) |
clear code
Signed-off-by: marinofaggiana <ios@nextcloud.com>
-rw-r--r-- | iOSClient/AppDelegate.swift | 2 | ||||
-rw-r--r-- | iOSClient/Main/NCFunctionCenter.swift | 6 | ||||
-rw-r--r-- | iOSClient/Menu/NCViewer+Menu.swift | 2 |
3 files changed, 5 insertions, 5 deletions
diff --git a/iOSClient/AppDelegate.swift b/iOSClient/AppDelegate.swift index bfd8c6587..fc1380fe7 100644 --- a/iOSClient/AppDelegate.swift +++ b/iOSClient/AppDelegate.swift @@ -865,7 +865,7 @@ class AppDelegate: UIResponder, UIApplicationDelegate, UNUserNotificationCenterD } DispatchQueue.main.asyncAfter(deadline: .now() + 0.5) { - NCFunctionCenter.shared.openFileViewInFolder(viewController: self.activeViewController, serverUrl: serverUrl, fileNameBlink: fileName) + NCFunctionCenter.shared.openFileViewInFolder(serverUrl: serverUrl, fileNameBlink: fileName) } } else { diff --git a/iOSClient/Main/NCFunctionCenter.swift b/iOSClient/Main/NCFunctionCenter.swift index fb739cd89..d15b19ac9 100644 --- a/iOSClient/Main/NCFunctionCenter.swift +++ b/iOSClient/Main/NCFunctionCenter.swift @@ -454,12 +454,12 @@ import Photos // MARK: - - func openFileViewInFolder(viewController: UIViewController?, serverUrl: String, fileNameBlink: String?) { + func openFileViewInFolder(serverUrl: String, fileNameBlink: String?) { var topNavigationController: UINavigationController? var pushServerUrl = NCUtilityFileSystem.shared.getHomeServer(account: appDelegate.account) - viewController?.navigationController?.popToRootViewController(animated: false) + appDelegate.activeViewController?.navigationController?.popToRootViewController(animated: false) if let tabBarController = appDelegate.window?.rootViewController as? UITabBarController { tabBarController.selectedIndex = 0 if let navigationController = tabBarController.viewControllers?.first as? UINavigationController { @@ -634,7 +634,7 @@ import Photos } let viewInFolder = UIAction(title: NSLocalizedString("_view_in_folder_", comment: ""), image: UIImage(systemName: "arrow.forward.square")) { _ in - self.openFileViewInFolder(viewController: viewController, serverUrl: metadata.serverUrl, fileNameBlink: metadata.fileName) + self.openFileViewInFolder(serverUrl: metadata.serverUrl, fileNameBlink: metadata.fileName) } let openIn = UIAction(title: NSLocalizedString("_open_in_", comment: ""), image: UIImage(systemName: "square.and.arrow.up") ) { _ in diff --git a/iOSClient/Menu/NCViewer+Menu.swift b/iOSClient/Menu/NCViewer+Menu.swift index 696acb086..160d9fef1 100644 --- a/iOSClient/Menu/NCViewer+Menu.swift +++ b/iOSClient/Menu/NCViewer+Menu.swift @@ -192,7 +192,7 @@ extension NCViewer { title: NSLocalizedString("_view_in_folder_", comment: ""), icon: NCUtility.shared.loadImage(named: "arrow.forward.square"), action: { menuAction in - NCFunctionCenter.shared.openFileViewInFolder(viewController: viewController, serverUrl: metadata.serverUrl, fileNameBlink: metadata.fileName) + NCFunctionCenter.shared.openFileViewInFolder(serverUrl: metadata.serverUrl, fileNameBlink: metadata.fileName) } ) ) |