marinofaggiana 4 years ago
parent
commit
e21c8aa1ff

+ 2 - 2
Nextcloud.xcodeproj/project.pbxproj

@@ -2793,8 +2793,8 @@
 			isa = XCRemoteSwiftPackageReference;
 			repositoryURL = "https://github.com/realm/realm-cocoa";
 			requirement = {
-				kind = upToNextMajorVersion;
-				minimumVersion = 5.4.5;
+				kind = exactVersion;
+				version = 5.4.8;
 			};
 		};
 /* End XCRemoteSwiftPackageReference section */

+ 4 - 4
Nextcloud.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved

@@ -6,8 +6,8 @@
         "repositoryURL": "https://github.com/realm/realm-cocoa",
         "state": {
           "branch": null,
-          "revision": "6cc90cde1d52b34a9bba6796d1bbe1a6ed312584",
-          "version": "5.4.5"
+          "revision": "96d5d28f9fd35bd5b109da376bfdc3194cd2794a",
+          "version": "5.4.8"
         }
       },
       {
@@ -15,8 +15,8 @@
         "repositoryURL": "https://github.com/realm/realm-core",
         "state": {
           "branch": null,
-          "revision": "95b206cef7040174a4663c5bf2250b83dfe74171",
-          "version": "6.1.2"
+          "revision": "612057010f5521d41559970306054f4c5b12632a",
+          "version": "6.1.4"
         }
       }
     ]

+ 4 - 16
iOSClient/Main/NCCollectionViewCommon.swift

@@ -313,7 +313,7 @@ class NCCollectionViewCommon: UIViewController, UIGestureRecognizerDelegate, UIS
         if let userInfo = notification.userInfo as NSDictionary? {
             if let serverUrlTo = userInfo["serverUrlTo"] as? String {
                 if serverUrlTo == self.serverUrl {
-                    self.reloadDataSource()
+                    reloadDataSource()
                 }
             }
         }
@@ -322,19 +322,7 @@ class NCCollectionViewCommon: UIViewController, UIGestureRecognizerDelegate, UIS
     @objc func renameFile(_ notification: NSNotification) {
         if self.view?.window == nil { return }
         
-        if let userInfo = notification.userInfo as NSDictionary? {
-            if let metadata = userInfo["metadata"] as? tableMetadata {
-                
-                if let row = dataSource.reloadMetadata(ocId: metadata.ocId) {
-                    let indexPath = IndexPath(row: row, section: 0)
-                    collectionView?.performBatchUpdates({
-                        collectionView?.reloadItems(at: [indexPath])
-                    }, completion: { (_) in
-                        self.collectionView?.reloadData()
-                    })
-                }
-            }
-        }
+        reloadDataSource()
     }
     
     @objc func createFolder(_ notification: NSNotification) {
@@ -354,7 +342,7 @@ class NCCollectionViewCommon: UIViewController, UIGestureRecognizerDelegate, UIS
                 }
             }
         } else {
-            self.reloadDataSourceNetwork()
+            reloadDataSourceNetwork()
         }
     }
     
@@ -364,7 +352,7 @@ class NCCollectionViewCommon: UIViewController, UIGestureRecognizerDelegate, UIS
         if let userInfo = notification.userInfo as NSDictionary? {
             if let metadata = userInfo["metadata"] as? tableMetadata {
                 if dataSource.getIndexMetadata(ocId: metadata.ocId) != nil {
-                    self.reloadDataSource()
+                    reloadDataSource()
                 }
             }
         }