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

+ 1 - 2
iOSClient/Main/CCDetail.m

@@ -205,7 +205,6 @@
         
         fileNameExtension = [[self.metadataDetail.fileNameView pathExtension] uppercaseString];
         
-/*
 #if DEBUG
         // Richdocument editor
         NSString *mimeType = [CCUtility getMimeType:self.metadataDetail.fileNameView];
@@ -234,7 +233,7 @@
             }
         }
 #endif
-*/
+
         if ([fileNameExtension isEqualToString:@"PDF"]) {
             
             self.edgesForExtendedLayout = UIRectEdgeBottom;

+ 5 - 1
iOSClient/Richdocument/NCRichdocument.swift

@@ -36,7 +36,11 @@ class NCRichdocument: NSObject, SwiftWebVCDelegate {
         
         let webVC = SwiftWebVC(urlString: link, hideToolbar: true)
         webVC.delegate = self
-        navigationViewController.setViewControllers([webVC], animated: false)
+        if navigationViewController.viewControllers.count > 1 {
+            navigationViewController.setViewControllers([navigationViewController.viewControllers.first!, webVC], animated: false)
+        } else {
+            navigationViewController.setViewControllers([webVC], animated: false)
+        }
     }
     
     func didStartLoading() {