From e1e42004db08f4daaa28cb56126994f98f654dfd Mon Sep 17 00:00:00 2001 From: Claudio Cambra Date: Wed, 28 Feb 2024 21:56:47 +0800 Subject: [PATCH] Add fetch related handling functions to ui delegate Signed-off-by: Claudio Cambra --- .../FileProviderUIExt/ShareViewController.swift | 10 ++++++++++ .../ShareViewDataSourceUIDelegate.swift | 2 ++ 2 files changed, 12 insertions(+) diff --git a/shell_integration/MacOSX/NextcloudIntegration/FileProviderUIExt/ShareViewController.swift b/shell_integration/MacOSX/NextcloudIntegration/FileProviderUIExt/ShareViewController.swift index 7bc8ffa45..d4e408d71 100644 --- a/shell_integration/MacOSX/NextcloudIntegration/FileProviderUIExt/ShareViewController.swift +++ b/shell_integration/MacOSX/NextcloudIntegration/FileProviderUIExt/ShareViewController.swift @@ -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 diff --git a/shell_integration/MacOSX/NextcloudIntegration/FileProviderUIExt/ShareViewDataSourceUIDelegate.swift b/shell_integration/MacOSX/NextcloudIntegration/FileProviderUIExt/ShareViewDataSourceUIDelegate.swift index 29ea26f54..2af2d05a5 100644 --- a/shell_integration/MacOSX/NextcloudIntegration/FileProviderUIExt/ShareViewDataSourceUIDelegate.swift +++ b/shell_integration/MacOSX/NextcloudIntegration/FileProviderUIExt/ShareViewDataSourceUIDelegate.swift @@ -9,6 +9,8 @@ import Foundation import NextcloudKit protocol ShareViewDataSourceUIDelegate { + func fetchStarted() + func fetchFinished() func hideOptions() func showOptions(share: NKShare) } -- 2.30.2