marinofaggiana 3 years ago
parent
commit
a621c6bd8c

+ 6 - 1
iOSClient/Activity/NCActivity.swift

@@ -64,10 +64,15 @@ class NCActivity: UIViewController, NCEmptyDataSetDelegate {
         
         NotificationCenter.default.addObserver(self, selector: #selector(self.changeTheming), name: NSNotification.Name(rawValue: NCGlobal.shared.notificationCenterChangeTheming), object: nil)
         
-        appDelegate.activeViewController = self
         changeTheming()
     }
     
+    override func viewWillAppear(_ animated: Bool) {
+        super.viewWillAppear(animated)
+        
+        appDelegate.activeViewController = self
+    }
+    
     override func viewDidAppear(_ animated: Bool) {
         super.viewDidAppear(animated)
         

+ 1 - 0
iOSClient/FileViewInFolder/NCFileViewInFolder.swift

@@ -43,6 +43,7 @@ class NCFileViewInFolder: NCCollectionViewCommon  {
     }
     
     override func viewWillAppear(_ animated: Bool) {
+
         appDelegate.activeViewController = self
         
         if serverUrl == NCUtilityFileSystem.shared.getHomeServer(urlBase: appDelegate.urlBase, account: appDelegate.account) {

+ 1 - 0
iOSClient/More/NCMore.swift

@@ -68,6 +68,7 @@ class NCMore: UIViewController, UITableViewDelegate, UITableViewDataSource {
 
     override func viewWillAppear(_ animated: Bool) {
         super.viewWillAppear(animated)
+        
         appDelegate.activeViewController = self
         
         loadItems()

+ 1 - 0
iOSClient/Notification/NCNotification.swift

@@ -56,6 +56,7 @@ class NCNotification: UITableViewController, NCNotificationCellDelegate, NCEmpty
     
     override func viewWillAppear(_ animated: Bool) {
         super.viewWillAppear(animated)
+        
         appDelegate.activeViewController = self
     }
     

+ 0 - 1
iOSClient/Transfers/NCTransfers.swift

@@ -56,7 +56,6 @@ class NCTransfers: NCCollectionViewCommon, NCTransferCellDelegate  {
         self.navigationItem.title = titleCurrentFolder
         
         setNavigationItem()
-        
         reloadDataSource()
     }
     

+ 1 - 0
iOSClient/Trash/NCTrash.swift

@@ -83,6 +83,7 @@ class NCTrash: UIViewController, UIGestureRecognizerDelegate, NCTrashListCellDel
     
     override func viewWillAppear(_ animated: Bool) {
         super.viewWillAppear(animated)
+        
         appDelegate.activeViewController = self
         
         self.navigationItem.title = titleCurrentFolder

+ 2 - 2
iOSClient/Viewer/NCViewerPDF/NCViewerPDF.swift

@@ -116,12 +116,12 @@ class NCViewerPDF: UIViewController, NCViewerPDFSearchDelegate {
     override func viewWillAppear(_ animated: Bool) {
         super.viewWillAppear(animated)
 
+        appDelegate.activeViewController = self
+
         navigationItem.rightBarButtonItem = UIBarButtonItem.init(image: UIImage(named: "more")!.image(color: NCBrandColor.shared.label, size: 25), style: .plain, target: self, action: #selector(self.openMenuMore))
         
         navigationController?.navigationBar.prefersLargeTitles = true
         navigationItem.title = metadata.fileNameView
-
-        appDelegate.activeViewController = self
     }
     
     override func viewDidAppear(_ animated: Bool) {

+ 2 - 2
iOSClient/Viewer/NCViewerRichdocument/NCViewerRichdocument.swift

@@ -74,13 +74,13 @@ class NCViewerRichdocument: UIViewController, WKNavigationDelegate, WKScriptMess
     override func viewWillAppear(_ animated: Bool) {
         super.viewWillAppear(animated)
 
+        appDelegate.activeViewController = self
+
         navigationItem.rightBarButtonItem = UIBarButtonItem.init(image: UIImage(named: "more")!.image(color: NCBrandColor.shared.label, size: 25), style: .plain, target: self, action: #selector(self.openMenuMore))
         
         navigationItem.hidesBackButton = true
         navigationController?.navigationBar.prefersLargeTitles = false
         navigationItem.title = metadata.fileNameView
-
-        appDelegate.activeViewController = self
     }
     
     override func viewWillDisappear(_ animated: Bool) {