Remove unnecessary full reimport after initial account configuration in FileProviderE...
authorClaudio Cambra <claudio.cambra@nextcloud.com>
Tue, 14 Mar 2023 18:23:49 +0000 (19:23 +0100)
committerClaudio Cambra <claudio.cambra@nextcloud.com>
Fri, 12 May 2023 05:21:33 +0000 (13:21 +0800)
Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>
shell_integration/MacOSX/NextcloudIntegration/FileProviderExt/FileProviderExtension.swift

index 909fd09220c9dd45031c44b4fd57f4326ba13d00..f991e013e0a564a0b6c1957c00366356b3635898 100644 (file)
@@ -616,20 +616,6 @@ class FileProviderExtension: NSObject, NSFileProviderReplicatedExtension, NKComm
             }
         }
 
-        guard NextcloudFilesDatabaseManager.shared.anyItemMetadatasForAccount(ncAccount!.ncKitAccount) else {
-            // When we have nothing registered, force full refresh.
-            // This refreshes the entire structure of the FileProvider and calls
-            // enumerateItems rather than enumerateChanges in the enumerator
-            NSLog("Signalling manager for user %@ at server %@ to reimport everything", ncAccount!.username, ncAccount!.serverUrl)
-            fpManager.reimportItems(below: .rootContainer) { error in
-                if error != nil {
-                    NSLog("Error reimporting everything, received error: %@", error!.localizedDescription)
-                }
-            }
-
-            return
-        }
-
         NSLog("Signalling enumerators for user %@ at server %@", ncAccount!.username, ncAccount!.serverUrl)
         fpManager.signalEnumerator(for: .workingSet) { error in
             if error != nil {