Browse Source

fix reload

marinofaggiana 4 years ago
parent
commit
7f3dcbf5b9
1 changed files with 11 additions and 0 deletions
  1. 11 0
      iOSClient/Viewer/NCViewerRichdocument/NCViewerRichdocument.swift

+ 11 - 0
iOSClient/Viewer/NCViewerRichdocument/NCViewerRichdocument.swift

@@ -319,3 +319,14 @@ class NCViewerRichdocument: UIViewController, WKNavigationDelegate, WKScriptMess
         NCUtility.shared.stopActivityIndicator()
     }
 }
+
+extension NCViewerRichdocument : UINavigationControllerDelegate {
+
+    override func didMove(toParent parent: UIViewController?) {
+        super.didMove(toParent: parent)
+        
+        if parent == nil {
+            NotificationCenter.default.postOnMainThread(name: k_notificationCenter_reloadDataSourceNetworkForced, userInfo: ["serverUrl":self.metadata.serverUrl])
+        }
+    }
+}