Tell delegate when fetch ongoing in share table view data source

Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>
This commit is contained in:
Claudio Cambra 2024-02-28 21:57:08 +08:00
parent e113a09ecf
commit 26d635b6fa

View file

@ -107,6 +107,9 @@ class ShareTableViewDataSource: NSObject, NSTableViewDataSource, NSTableViewDele
private func fetch( private func fetch(
itemIdentifier: NSFileProviderItemIdentifier, itemRelativePath: String itemIdentifier: NSFileProviderItemIdentifier, itemRelativePath: String
) async -> [NKShare] { ) async -> [NKShare] {
Task { @MainActor in uiDelegate?.fetchStarted() }
defer { Task { @MainActor in uiDelegate?.fetchFinished() } }
let rawIdentifier = itemIdentifier.rawValue let rawIdentifier = itemIdentifier.rawValue
Logger.sharesDataSource.info("Fetching shares for item \(rawIdentifier, privacy: .public)") Logger.sharesDataSource.info("Fetching shares for item \(rawIdentifier, privacy: .public)")