Add fetch related handling functions to ui delegate
authorClaudio Cambra <claudio.cambra@nextcloud.com>
Wed, 28 Feb 2024 13:56:47 +0000 (21:56 +0800)
committerClaudio Cambra <claudio.cambra@nextcloud.com>
Wed, 17 Apr 2024 08:38:53 +0000 (16:38 +0800)
Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>
shell_integration/MacOSX/NextcloudIntegration/FileProviderUIExt/ShareViewController.swift
shell_integration/MacOSX/NextcloudIntegration/FileProviderUIExt/ShareViewDataSourceUIDelegate.swift

index 7bc8ffa452070aca3a46497d3cd8457792769e54..d4e408d71708319dedcb48cffefa62ebdc89be6f 100644 (file)
@@ -101,6 +101,16 @@ class ShareViewController: NSViewController, ShareViewDataSourceUIDelegate {
         fileNameIcon.image = fileThumbnail?.nsImage
     }
 
+    func fetchStarted() {
+        loadingEffectView.isHidden = false
+        loadingIndicator.startAnimation(self)
+    }
+
+    func fetchFinished() {
+        loadingEffectView.isHidden = true
+        loadingIndicator.stopAnimation(self)
+    }
+
     func hideOptions() {
         splitView.removeArrangedSubview(optionsView)
         optionsView.isHidden = true
index 29ea26f54b9e3cf4434f1e9e24298fd284ebd52a..2af2d05a55410f676a3849b35fc3f1089f9659f6 100644 (file)
@@ -9,6 +9,8 @@ import Foundation
 import NextcloudKit
 
 protocol ShareViewDataSourceUIDelegate {
+    func fetchStarted()
+    func fetchFinished()
     func hideOptions()
     func showOptions(share: NKShare)
 }