Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions Nextcloud.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -6323,7 +6323,7 @@
CLANG_WARN_UNREACHABLE_CODE = YES;
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
COPY_PHASE_STRIP = NO;
CURRENT_PROJECT_VERSION = 3;
CURRENT_PROJECT_VERSION = 4;
DEAD_CODE_STRIPPING = YES;
DEBUG_INFORMATION_FORMAT = dwarf;
DEVELOPMENT_TEAM = NKUJUXUJ3B;
Expand Down Expand Up @@ -6391,7 +6391,7 @@
CLANG_WARN_UNREACHABLE_CODE = YES;
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
COPY_PHASE_STRIP = NO;
CURRENT_PROJECT_VERSION = 3;
CURRENT_PROJECT_VERSION = 4;
DEAD_CODE_STRIPPING = YES;
DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
DEVELOPMENT_TEAM = NKUJUXUJ3B;
Expand Down
2 changes: 1 addition & 1 deletion iOSClient/Media/NCMedia+CollectionViewDataSource.swift
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ extension NCMedia: UICollectionViewDataSource {
]
)

if searchMediaInProgress {
if searchMediaInProgress || datasourceMediaInProgress {
header.emptyTitle.text = NSLocalizedString(
"_search_in_progress_",
comment: ""
Expand Down
4 changes: 2 additions & 2 deletions iOSClient/Media/NCMedia+Command.swift
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ extension NCMedia {
}
}

self.collectionView.reloadData()
collectionViewReloadData()

Task {
await (self.navigationController as? NCMainNavigationController)?.setNavigationLeftItems()
Expand Down Expand Up @@ -216,7 +216,7 @@ extension NCMedia {

navigationItem.leftBarButtonItems = items.isEmpty ? nil : items
if items.isEmpty {
collectionView.reloadData()
collectionViewReloadData()
}
}
}
Expand Down
1 change: 1 addition & 0 deletions iOSClient/Media/NCMedia.swift
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,7 @@ class NCMedia: UIViewController {
var searchMediaTask: Task<Void, Never>?
var buildDataSourceTask: Task<Void, Never>?

var datasourceMediaInProgress: Bool = false
var searchMediaInProgress: Bool = false {
didSet {
guard oldValue != searchMediaInProgress else {
Expand Down
8 changes: 8 additions & 0 deletions iOSClient/Media/NCMediaDataSource.swift
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,14 @@ import RealmSwift

extension NCMedia {
func loadDataSource(forced: Bool = false) async {
defer {
datasourceMediaInProgress = false
}
datasourceMediaInProgress = true
if self.dataSource.isEmpty() {
collectionViewReloadData()
}

let account = self.session.account

guard !Task.isCancelled else {
Expand Down
2 changes: 1 addition & 1 deletion iOSClient/Media/NCMediaPinchGesture.swift
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ extension NCMedia {
options: .transitionCrossDissolve
) {
self.collectionView.collectionViewLayout.invalidateLayout()
self.collectionView.reloadData()
self.collectionViewReloadData()
self.collectionView.layoutIfNeeded()

guard let updatedAttributes = self.collectionView
Expand Down
Loading