Browse Source

Update library NCCommunication

Signed-off-by: marinofaggiana <marino@marinofaggiana.com>
marinofaggiana 3 years ago
parent
commit
3a82f895b1
1 changed files with 9 additions and 0 deletions
  1. 9 0
      iOSClient/Viewer/NCViewerMedia/NCViewerMedia.swift

+ 9 - 0
iOSClient/Viewer/NCViewerMedia/NCViewerMedia.swift

@@ -108,6 +108,8 @@ class NCViewerMedia: UIViewController {
         
         NotificationCenter.default.addObserver(self, selector: #selector(hidePlayerToolBar(_:)), name: NSNotification.Name(rawValue: NCGlobal.shared.notificationCenterHidePlayerToolBar), object: nil)
         NotificationCenter.default.addObserver(self, selector: #selector(showPlayerToolBar(_:)), name: NSNotification.Name(rawValue: NCGlobal.shared.notificationCenterShowPlayerToolBar), object: nil)
+        
+        NotificationCenter.default.addObserver(self, selector: #selector(applicationDidBecomeActive(_:)), name: NSNotification.Name(rawValue: NCGlobal.shared.notificationCenterApplicationDidBecomeActive), object: nil)
     }
     
     override func viewDidDisappear(_ animated: Bool) {
@@ -137,6 +139,8 @@ class NCViewerMedia: UIViewController {
         
         NotificationCenter.default.removeObserver(self, name: NSNotification.Name(rawValue: NCGlobal.shared.notificationCenterHidePlayerToolBar), object: nil)
         NotificationCenter.default.removeObserver(self, name: NSNotification.Name(rawValue: NCGlobal.shared.notificationCenterShowPlayerToolBar), object: nil)
+        
+        NotificationCenter.default.removeObserver(self, name: NSNotification.Name(rawValue: NCGlobal.shared.notificationCenterApplicationDidBecomeActive), object: nil)
     }
     
     override var preferredStatusBarStyle: UIStatusBarStyle {
@@ -330,6 +334,11 @@ class NCViewerMedia: UIViewController {
         }
     }
     
+    @objc func applicationDidBecomeActive(_ notification: NSNotification) {
+        
+        progressView.progress = 0
+    }
+    
     //MARK: - Image
     
     func getImageMetadata(_ metadata: tableMetadata) -> UIImage? {