Skip to content

Commit

Permalink
Preview media (#3240)
Browse files Browse the repository at this point in the history
* cod

Signed-off-by: Marino Faggiana <[email protected]>

* rev

Signed-off-by: Marino Faggiana <[email protected]>

---------

Signed-off-by: Marino Faggiana <[email protected]>
  • Loading branch information
marinofaggiana authored Dec 15, 2024
1 parent a6c7df7 commit c2d5ca3
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 8 deletions.
8 changes: 4 additions & 4 deletions Nextcloud.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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;
Expand Down Expand Up @@ -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" */ = {
Expand Down
10 changes: 6 additions & 4 deletions iOSClient/Media/NCMedia.swift
Original file line number Diff line number Diff line change
Expand Up @@ -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<String> = ThreadSafeArray()
var ocIdDoNotExists: ThreadSafeArray<String> = ThreadSafeArray()
var hasRunSearchMedia: Bool = false
var attributesZoomIn: UIMenuElement.Attributes = []
var attributesZoomOut: UIMenuElement.Attributes = []
Expand Down Expand Up @@ -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()
}
}
Expand Down

0 comments on commit c2d5ca3

Please sign in to comment.