From 68370ade881f1de4e454bd5bf54df298e61c9ba6 Mon Sep 17 00:00:00 2001 From: Claudio Cambra Date: Wed, 17 Apr 2024 00:48:59 +0800 Subject: [PATCH] Add change observer from NCFPK Signed-off-by: Claudio Cambra --- .../FileProviderExt/FileProviderExtension+ClientInterface.swift | 2 ++ .../FileProviderExt/FileProviderExtension.swift | 1 + 2 files changed, 3 insertions(+) diff --git a/shell_integration/MacOSX/NextcloudIntegration/FileProviderExt/FileProviderExtension+ClientInterface.swift b/shell_integration/MacOSX/NextcloudIntegration/FileProviderExt/FileProviderExtension+ClientInterface.swift index 32302fea5..dcf78a75c 100644 --- a/shell_integration/MacOSX/NextcloudIntegration/FileProviderExt/FileProviderExtension+ClientInterface.swift +++ b/shell_integration/MacOSX/NextcloudIntegration/FileProviderExt/FileProviderExtension+ClientInterface.swift @@ -103,6 +103,8 @@ extension FileProviderExtension: NSFileProviderServicing { nextcloudVersion: 25, delegate: nil) // TODO: add delegate methods for self + changeObserver = RemoteChangeObserver(ncKit: ncKit, domain: domain) + Logger.fileProviderExtension.info( "Nextcloud account set up in File Provider extension for user: \(user, privacy: .public) at server: \(serverUrl, privacy: .public)" ) diff --git a/shell_integration/MacOSX/NextcloudIntegration/FileProviderExt/FileProviderExtension.swift b/shell_integration/MacOSX/NextcloudIntegration/FileProviderExt/FileProviderExtension.swift index 1ee6476a3..122398203 100644 --- a/shell_integration/MacOSX/NextcloudIntegration/FileProviderExt/FileProviderExtension.swift +++ b/shell_integration/MacOSX/NextcloudIntegration/FileProviderExt/FileProviderExtension.swift @@ -23,6 +23,7 @@ import OSLog let ncKit = NextcloudKit() let appGroupIdentifier = Bundle.main.object(forInfoDictionaryKey: "SocketApiPrefix") as? String var ncAccount: Account? + var changeObserver: RemoteChangeObserver? lazy var ncKitBackground = NKBackground(nkCommonInstance: ncKit.nkCommonInstance) lazy var socketClient: LocalSocketClient? = { guard let containerUrl = pathForAppGroupContainer() else {