marinofaggiana %!s(int64=3) %!d(string=hai) anos
pai
achega
8f9f2bd046
Modificáronse 1 ficheiros con 12 adicións e 0 borrados
  1. 12 0
      iOSClient/Viewer/NCViewerMedia/NCPlayer/NCPlayer.swift

+ 12 - 0
iOSClient/Viewer/NCViewerMedia/NCPlayer/NCPlayer.swift

@@ -114,10 +114,17 @@ class NCPlayer: NSObject {
         })
         
         NotificationCenter.default.addObserver(self, selector: #selector(applicationDidEnterBackground(_:)), name: NSNotification.Name(rawValue: NCGlobal.shared.notificationCenterApplicationDidEnterBackground), object: nil)
+        
+        NotificationCenter.default.addObserver(self, selector: #selector(applicationDidBecomeActive(_:)), name: NSNotification.Name(rawValue: NCGlobal.shared.notificationCenterApplicationDidBecomeActive), object: nil)
     }
 
     deinit {
         print("deinit NCPlayer")
+        
+        NotificationCenter.default.removeObserver(self, name: NSNotification.Name(rawValue: NCGlobal.shared.notificationCenterApplicationDidEnterBackground), object: nil)
+
+        NotificationCenter.default.removeObserver(self, name: NSNotification.Name(rawValue: NCGlobal.shared.notificationCenterApplicationDidBecomeActive), object: nil)
+
     }
     
     //MARK: - NotificationCenter
@@ -129,6 +136,11 @@ class NCPlayer: NSObject {
         }
     }
     
+    @objc func applicationDidBecomeActive(_ notification: NSNotification) {
+        
+        playerToolBar?.updateToolBar()
+    }
+    
     //MARK: -
     
     func videoPlay() {