Add change observer from NCFPK

Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>
This commit is contained in:
Claudio Cambra 2024-04-17 00:48:59 +08:00
Родитель 6a64248ff6
Коммит 68370ade88
Не найден ключ, соответствующий данной подписи
Идентификатор ключа GPG: C839200C384636B0
2 изменённых файлов: 3 добавлений и 0 удалений

Просмотреть файл

@ -103,6 +103,8 @@ extension FileProviderExtension: NSFileProviderServicing {
nextcloudVersion: 25, nextcloudVersion: 25,
delegate: nil) // TODO: add delegate methods for self delegate: nil) // TODO: add delegate methods for self
changeObserver = RemoteChangeObserver(ncKit: ncKit, domain: domain)
Logger.fileProviderExtension.info( Logger.fileProviderExtension.info(
"Nextcloud account set up in File Provider extension for user: \(user, privacy: .public) at server: \(serverUrl, privacy: .public)" "Nextcloud account set up in File Provider extension for user: \(user, privacy: .public) at server: \(serverUrl, privacy: .public)"
) )

Просмотреть файл

@ -23,6 +23,7 @@ import OSLog
let ncKit = NextcloudKit() let ncKit = NextcloudKit()
let appGroupIdentifier = Bundle.main.object(forInfoDictionaryKey: "SocketApiPrefix") as? String let appGroupIdentifier = Bundle.main.object(forInfoDictionaryKey: "SocketApiPrefix") as? String
var ncAccount: Account? var ncAccount: Account?
var changeObserver: RemoteChangeObserver?
lazy var ncKitBackground = NKBackground(nkCommonInstance: ncKit.nkCommonInstance) lazy var ncKitBackground = NKBackground(nkCommonInstance: ncKit.nkCommonInstance)
lazy var socketClient: LocalSocketClient? = { lazy var socketClient: LocalSocketClient? = {
guard let containerUrl = pathForAppGroupContainer() else { guard let containerUrl = pathForAppGroupContainer() else {