diff --git a/Nextcloud.xcodeproj/project.pbxproj b/Nextcloud.xcodeproj/project.pbxproj index fb4ae15b23..8409f7a395 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 = 3; + CURRENT_PROJECT_VERSION = 4; DEBUG_INFORMATION_FORMAT = dwarf; DEVELOPMENT_TEAM = NKUJUXUJ3B; ENABLE_STRICT_OBJC_MSGSEND = YES; @@ -5569,7 +5569,7 @@ CLANG_WARN_UNREACHABLE_CODE = YES; CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; COPY_PHASE_STRIP = NO; - CURRENT_PROJECT_VERSION = 3; + CURRENT_PROJECT_VERSION = 4; DEVELOPMENT_TEAM = NKUJUXUJ3B; ENABLE_STRICT_OBJC_MSGSEND = YES; ENABLE_TESTABILITY = YES; @@ -5867,8 +5867,8 @@ isa = XCRemoteSwiftPackageReference; repositoryURL = "https://github.com/nextcloud/NextcloudKit"; requirement = { - branch = develop; - kind = branch; + kind = exactVersion; + version = 5.0.2; }; }; F788ECC5263AAAF900ADC67F /* XCRemoteSwiftPackageReference "MarkdownKit" */ = { diff --git a/iOSClient/Media/NCMedia.swift b/iOSClient/Media/NCMedia.swift index 8de4ed4684..1592201655 100644 --- a/iOSClient/Media/NCMedia.swift +++ b/iOSClient/Media/NCMedia.swift @@ -53,8 +53,8 @@ class NCMedia: UIViewController { var isTop: Bool = true var isEditMode = false var fileSelect: [String] = [] - var filesExists: [String] = [] - var ocIdDoNotExists: [String] = [] + var filesExists: ThreadSafeArray = ThreadSafeArray() + var ocIdDoNotExists: ThreadSafeArray = ThreadSafeArray() var hasRunSearchMedia: Bool = false var attributesZoomIn: UIMenuElement.Attributes = [] var attributesZoomOut: UIMenuElement.Attributes = [] @@ -292,10 +292,12 @@ class NCMedia: UIViewController { ocIdDoNotExists.append(ocId) } - if NCNetworking.shared.fileExistsQueue.operationCount == 0, !ocIdDoNotExists.isEmpty { + if NCNetworking.shared.fileExistsQueue.operationCount == 0, + !ocIdDoNotExists.isEmpty, + let ocIdDoNotExists = self.ocIdDoNotExists.getArray() { dataSource.removeMetadata(ocIdDoNotExists) database.deleteMetadataOcIds(ocIdDoNotExists) - ocIdDoNotExists.removeAll() + self.ocIdDoNotExists.removeAll() collectionViewReloadData() } }