Marino Faggiana 6 years ago
parent
commit
b72feb99dd
2 changed files with 4 additions and 10 deletions
  1. 1 1
      iOSClient/Main/CCDetail.m
  2. 3 9
      iOSClient/Richdocument/NCRichdocument.swift

+ 1 - 1
iOSClient/Main/CCDetail.m

@@ -214,8 +214,8 @@
                     
                     [ocNetworking createLinkRichdocumentsWithFileID:self.metadataDetail.fileID success:^(NSString *link) {
                         
-                        [appDelegate aspectNavigationControllerBar:self.navigationController.navigationBar online:[appDelegate.reachability isReachable] hidden:NO];
                         [[NCRichdocument sharedInstance] viewRichDocumentAt:link viewDetail:self];
+                        [appDelegate aspectNavigationControllerBar:self.navigationController.navigationBar online:[appDelegate.reachability isReachable] hidden:NO];
 
                     } failure:^(NSString *message, NSInteger errorCode) {
                         

+ 3 - 9
iOSClient/Richdocument/NCRichdocument.swift

@@ -63,17 +63,11 @@ class NCRichdocument: NSObject, WKNavigationDelegate, WKScriptMessageHandler {
         
         if (message.name == "RichDocumentsMobileInterface") {
             if message.body as! String == "close" {
-                print("\(message.body)")
-                
-
-                for view in self.viewDetail.view.subviews{
-                    if view.tag < 900 {
-                        view.removeFromSuperview()
-                    }
-                }
 
-                self.viewDetail.navigationController?.popToRootViewController(animated: true)
+                self.webView.removeFromSuperview()
                 
+                self.viewDetail.navigationController?.popToRootViewController(animated: true)
+                self.viewDetail.navigationController?.navigationBar.topItem?.title = ""
             }
         }
     }