浏览代码

remove old code

Signed-off-by: marinofaggiana <ios@nextcloud.com>
marinofaggiana 2 年之前
父节点
当前提交
9d9eddbb96

+ 0 - 16
iOSClient/Brand/NCBrand.swift

@@ -345,22 +345,6 @@ class NCBrandColor: NSObject {
         brandText = customerText
     }
 
-    /*
-    func createColors() {
-        #if !EXTENSION
-        if let tableAccount = NCManageDatabase.shared.getActiveAccount() {
-            settingThemingColor(account: tableAccount.account)
-        } else {
-            createImagesThemingColor()
-        }
-        createUserColors()
-        #else
-        createImagesThemingColor()
-        createUserColors()
-        #endif
-    }
-    */
-    
     func createUserColors() {
         userColors = generateColors()
     }

+ 0 - 56
iOSClient/Data/NCManageDatabase+Account.swift

@@ -373,62 +373,6 @@ extension NCManageDatabase {
         return tableAccount.init(value: returnAccount)
     }
 
-    /*
-    #if !EXTENSION
-    @objc func setAccountHCFeatures(_ features: HCFeatures) -> tableAccount? {
-        
-        let realm = try! Realm()
-        
-        var returnAccount = tableAccount()
-
-        do {
-            guard let account = self.getAccountActive() else {
-                return nil
-            }
-            
-            try realm.write {
-                
-                guard let result = realm.objects(tableAccount.self).filter("account == %@", account.account).first else {
-                    return
-                }
-                
-                result.hcIsTrial = features.isTrial
-                result.hcTrialExpired = features.trialExpired
-                result.hcTrialRemainingSec = features.trialRemainingSec
-                if features.trialEndTime > 0 {
-                    result.hcTrialEndTime = Date(timeIntervalSince1970: features.trialEndTime) as NSDate
-                } else {
-                    result.hcTrialEndTime = nil
-                }
-                
-                result.hcAccountRemoveExpired = features.accountRemoveExpired
-                result.hcAccountRemoveRemainingSec = features.accountRemoveRemainingSec
-                if features.accountRemoveTime > 0 {
-                    result.hcAccountRemoveTime = Date(timeIntervalSince1970: features.accountRemoveTime) as NSDate
-                } else {
-                    result.hcAccountRemoveTime = nil
-                }
-                
-                result.hcNextGroupExpirationGroup = features.nextGroupExpirationGroup
-                result.hcNextGroupExpirationGroupExpired = features.nextGroupExpirationGroupExpired
-                if features.nextGroupExpirationExpiresTime > 0 {
-                    result.hcNextGroupExpirationExpiresTime = Date(timeIntervalSince1970: features.nextGroupExpirationExpiresTime) as NSDate
-                } else {
-                    result.hcNextGroupExpirationExpiresTime = nil
-                }
-                result.hcNextGroupExpirationExpires = features.nextGroupExpirationExpires
-                
-                returnAccount = result
-            }
-        } catch let error {
-            print("[LOG] Could not write to database: ", error)
-        }
-        
-        return tableAccount.init(value: returnAccount)
-    }
-    #endif
-    */
-
     @objc func setAccountMediaPath(_ path: String, account: String) {
 
         let realm = try! Realm()

+ 0 - 17
iOSClient/Data/NCManageDatabase.swift

@@ -700,23 +700,6 @@ class NCManageDatabase: NSObject {
         return tableDirectory.init(value: directory)
     }
 
-    /*
-    @objc func addDirectoryRichWorkspace(ocId: String, richWorkspace: String?) {
-        
-        let realm = try! Realm()
-
-        do {
-            try realm.safeWrite {
-                if let result = realm.objects(tableDirectory.self).filter("ocId == %@", ocId).first {
-                    result.richWorkspace = richWorkspace
-                }
-            }
-        } catch let error {
-            NCCommunicationCommon.shared.writeLog("Could not write to database: \(error)")
-        }
-    }
-    */
-
     @objc func addDirectory(encrypted: Bool, favorite: Bool, ocId: String, fileId: String, etag: String? = nil, permissions: String? = nil, serverUrl: String, account: String) {
 
         let realm = try! Realm()

+ 0 - 25
iOSClient/Main/Collection Common/NCCollectionViewCommon.swift

@@ -329,24 +329,6 @@ class NCCollectionViewCommon: UIViewController, UIGestureRecognizerDelegate, UIS
         collectionView.backgroundColor = NCBrandColor.shared.systemBackground
         refreshControl.tintColor = .gray
 
-        /*
-        // IMAGE BACKGROUND
-        if let layoutForView = layoutForView, layoutForView.directoryColor != "" {
-            let imagePath = CCUtility.getDirectoryGroup().appendingPathComponent(NCGlobal.shared.appBackground).path + "/" + layoutForView.imageBackgroud
-            do {
-                let data = try Data(contentsOf: URL(fileURLWithPath: imagePath))
-                if let image = UIImage(data: data) {
-                    backgroundImageView.image = image
-                    backgroundImageView.contentMode = .scaleToFill
-                    collectionView.backgroundView = backgroundImageView
-                }
-            } catch { }
-        } else {
-            backgroundImageView.image = nil
-            collectionView.backgroundView = nil
-        }
-        */
-        
         // COLOR BACKGROUND
         let activeAccount = NCManageDatabase.shared.getActiveAccount()
         if traitCollection.userInterfaceStyle == .dark {
@@ -967,13 +949,6 @@ class NCCollectionViewCommon: UIViewController, UIGestureRecognizerDelegate, UIS
     @objc func longPressCollecationView(_ gestureRecognizer: UILongPressGestureRecognizer) {
 
         openMenuItems(with: nil, gestureRecognizer: gestureRecognizer)
-        /*
-        if #available(iOS 13.0, *) {
-            
-            let interaction = UIContextMenuInteraction(delegate: self)
-            self.view.addInteraction(interaction)
-        }
-        */
     }
 
     @available(iOS 13.0, *)

+ 0 - 20
iOSClient/Main/Create cloud/NCCreateFormUploadAssets.swift

@@ -335,26 +335,6 @@ class NCCreateFormUploadAssets: XLFormViewController, NCSelectDelegate {
         }
     }
 
-    /*
-    func save() {
-        
-        self.dismiss(animated: true, completion: {
-            
-            let useFolderPhotoRow : XLFormRowDescriptor  = self.form.formRow(withTag: "useFolderAutoUpload")!
-            let useSubFolderRow : XLFormRowDescriptor  = self.form.formRow(withTag: "useSubFolder")!
-            var useSubFolder : Bool = false
-            
-            if (useFolderPhotoRow.value! as AnyObject).boolValue == true {
-                
-                self.serverUrl = NCManageDatabase.shared.getAccountAutoUploadPath(urlBase: self.appDelegate.urlBase, account: self.appDelegate.account)
-                useSubFolder = (useSubFolderRow.value! as AnyObject).boolValue
-            }
-            
-            self.appDelegate.activeMain.uploadFileAsset(self.assets, serverUrl: self.serverUrl, useSubFolder: useSubFolder, session: self.session)
-        })
-    }
-    */
-
     @objc func save() {
 
         DispatchQueue.global().async {

+ 0 - 16
iOSClient/Viewer/NCViewerMedia/NCPlayer/NCPlayerToolBar.swift

@@ -487,27 +487,11 @@ class NCPlayerToolBar: UIView {
     @IBAction func tapForward(_ sender: Any) {
 
         skip(seconds: 10)
-
-        /*
-         if metadata?.classFile == NCCommunicationCommon.typeClassFile.video.rawValue {
-         skip(seconds: 10)
-         } else if metadata?.classFile == NCCommunicationCommon.typeClassFile.audio.rawValue {
-         forward()
-         }
-         */
     }
 
     @IBAction func tapBack(_ sender: Any) {
 
         skip(seconds: -10)
-
-        /*
-         if metadata?.classFile == NCCommunicationCommon.typeClassFile.video.rawValue {
-         skip(seconds: -10)
-         } else if metadata?.classFile == NCCommunicationCommon.typeClassFile.audio.rawValue {
-         backward()
-         }
-         */
     }
 
     @IBAction func tapSubtitle(_ sender: Any) {

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

@@ -378,26 +378,6 @@ class NCViewerMediaPage: UIViewController {
             }
         }
 
-        // AUDIO < >
-        /*
-        if metadata?.classFile == NCCommunicationCommon.typeClassFile.audio.rawValue {
-                        
-            MPRemoteCommandCenter.shared().nextTrackCommand.isEnabled = true
-            appDelegate.nextTrackCommand = MPRemoteCommandCenter.shared().nextTrackCommand.addTarget { event in
-                
-                self.forward()
-                return .success
-            }
-            
-            MPRemoteCommandCenter.shared().previousTrackCommand.isEnabled = true
-            appDelegate.previousTrackCommand = MPRemoteCommandCenter.shared().previousTrackCommand.addTarget { event in
-             
-                self.backward()
-                return .success
-            }
-        }
-        */
-
         nowPlayingInfo[MPMediaItemPropertyTitle] = metadata.fileNameView
         nowPlayingInfo[MPMediaItemPropertyPlaybackDuration] = ncplayer.durationTime.seconds
         if let image = currentViewController.image {