From db25343dc89e92cda2a06d784f8ec6e659ce3bf6 Mon Sep 17 00:00:00 2001 From: Marino Faggiana Date: Wed, 18 Dec 2024 09:49:31 +0100 Subject: [PATCH 1/2] test --- iOSClient/Files/NCFiles.swift | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/iOSClient/Files/NCFiles.swift b/iOSClient/Files/NCFiles.swift index 0bb1dc3f75..98eb03b087 100644 --- a/iOSClient/Files/NCFiles.swift +++ b/iOSClient/Files/NCFiles.swift @@ -125,7 +125,13 @@ class NCFiles: NCCollectionViewCommon { guard !isSearchingMode else { return super.reloadDataSource() } - self.semaphoreReloadDataSource.wait() + // self.semaphoreReloadDataSource.wait() + + if self.semaphoreReloadDataSource.wait(timeout: .now() + 2) == .success { + self.semaphoreReloadDataSource.signal() + } else { + self.semaphoreReloadDataSource.signal() + } var predicate = self.defaultPredicate let predicateDirectory = NSPredicate(format: "account == %@ AND serverUrl == %@", session.account, self.serverUrl) From b7b896e1b2e0109582e50a3519f145b01470903f Mon Sep 17 00:00:00 2001 From: Marino Faggiana Date: Wed, 18 Dec 2024 10:13:43 +0100 Subject: [PATCH 2/2] fix --- Nextcloud.xcodeproj/project.pbxproj | 8 ++++---- iOSClient/Files/NCFiles.swift | 8 +------- .../Collection Common/NCCollectionViewDataSource.swift | 4 +--- 3 files changed, 6 insertions(+), 14 deletions(-) diff --git a/Nextcloud.xcodeproj/project.pbxproj b/Nextcloud.xcodeproj/project.pbxproj index 8409f7a395..ddd8c486ed 100644 --- a/Nextcloud.xcodeproj/project.pbxproj +++ b/Nextcloud.xcodeproj/project.pbxproj @@ -5503,7 +5503,7 @@ CLANG_WARN_UNREACHABLE_CODE = YES; CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; COPY_PHASE_STRIP = NO; - CURRENT_PROJECT_VERSION = 4; + CURRENT_PROJECT_VERSION = 0; DEBUG_INFORMATION_FORMAT = dwarf; DEVELOPMENT_TEAM = NKUJUXUJ3B; ENABLE_STRICT_OBJC_MSGSEND = YES; @@ -5530,7 +5530,7 @@ "@executable_path/Frameworks", "@executable_path/../../Frameworks", ); - MARKETING_VERSION = 6.1.9; + MARKETING_VERSION = 6.2.0; ONLY_ACTIVE_ARCH = YES; OTHER_CFLAGS = "-v"; OTHER_LDFLAGS = ""; @@ -5569,7 +5569,7 @@ CLANG_WARN_UNREACHABLE_CODE = YES; CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; COPY_PHASE_STRIP = NO; - CURRENT_PROJECT_VERSION = 4; + CURRENT_PROJECT_VERSION = 0; DEVELOPMENT_TEAM = NKUJUXUJ3B; ENABLE_STRICT_OBJC_MSGSEND = YES; ENABLE_TESTABILITY = YES; @@ -5593,7 +5593,7 @@ "@executable_path/Frameworks", "@executable_path/../../Frameworks", ); - MARKETING_VERSION = 6.1.9; + MARKETING_VERSION = 6.2.0; ONLY_ACTIVE_ARCH = YES; OTHER_CFLAGS = "-v"; OTHER_LDFLAGS = ""; diff --git a/iOSClient/Files/NCFiles.swift b/iOSClient/Files/NCFiles.swift index 98eb03b087..0bb1dc3f75 100644 --- a/iOSClient/Files/NCFiles.swift +++ b/iOSClient/Files/NCFiles.swift @@ -125,13 +125,7 @@ class NCFiles: NCCollectionViewCommon { guard !isSearchingMode else { return super.reloadDataSource() } - // self.semaphoreReloadDataSource.wait() - - if self.semaphoreReloadDataSource.wait(timeout: .now() + 2) == .success { - self.semaphoreReloadDataSource.signal() - } else { - self.semaphoreReloadDataSource.signal() - } + self.semaphoreReloadDataSource.wait() var predicate = self.defaultPredicate let predicateDirectory = NSPredicate(format: "account == %@ AND serverUrl == %@", session.account, self.serverUrl) diff --git a/iOSClient/Main/Collection Common/NCCollectionViewDataSource.swift b/iOSClient/Main/Collection Common/NCCollectionViewDataSource.swift index ce16734496..f6bf0b3ca3 100644 --- a/iOSClient/Main/Collection Common/NCCollectionViewDataSource.swift +++ b/iOSClient/Main/Collection Common/NCCollectionViewDataSource.swift @@ -290,9 +290,7 @@ class NCCollectionViewDataSource: NSObject { counter += 1 } - DispatchQueue.main.async { - return completion(updated) - } + return completion(updated) } }