Răsfoiți Sursa

Improvements code

Signed-off-by: marinofaggiana <ios@nextcloud.com>
marinofaggiana 3 ani în urmă
părinte
comite
4a57279666

+ 3 - 5
iOSClient/Viewer/NCViewerMedia/NCPlayer/NCPlayer.swift

@@ -130,20 +130,18 @@ class NCPlayer: NSObject {
         switch keyPath {
         case "status":
             if let playerItem = self.player?.currentItem,
-               let object = object as? AVPlayerItem,
-               playerItem === object{
-
+                let object = object as? AVPlayerItem,
+                playerItem === object{
                 if (playerItem.status == .readyToPlay || playerItem.status == .failed) {
                     print("player ready")
                     self.startPlayer()
                 } else {
                     print("player not ready")
                 }
-
             }
             break
         default:
-            ()
+            break
         }
     }
 

+ 0 - 4
iOSClient/Viewer/NCViewerMedia/NCViewerMediaPage.swift

@@ -120,10 +120,6 @@ class NCViewerMediaPage: UIViewController {
         metadatas.removeAll()
         ncplayerLivePhoto = nil
 
-        #if MFFFLIB
-        MFFF.shared.dismissMessage()
-        #endif
-
         // Remove Observer
         NotificationCenter.default.removeObserver(self, name: NSNotification.Name(rawValue: NCGlobal.shared.notificationCenterDeleteFile), object: nil)
         NotificationCenter.default.removeObserver(self, name: NSNotification.Name(rawValue: NCGlobal.shared.notificationCenterRenameFile), object: nil)