mirror of
https://github.com/nextcloud/desktop.git
synced 2024-12-18 03:41:50 +03:00
Run post-auth state check with main actor task
Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>
This commit is contained in:
parent
f3dde1907a
commit
1b75056fb1
1 changed files with 21 additions and 19 deletions
|
@ -145,25 +145,27 @@ extension FileProviderExtension: NSFileProviderServicing, ChangeNotificationInte
|
|||
)
|
||||
}
|
||||
|
||||
let newNcAccount =
|
||||
Account(user: user, id: userId, serverUrl: serverUrl, password: password)
|
||||
guard newNcAccount != ncAccount else { return }
|
||||
ncAccount = newNcAccount
|
||||
ncKit.setup(
|
||||
account: newNcAccount.ncKitAccount,
|
||||
user: newNcAccount.username,
|
||||
userId: newNcAccount.id,
|
||||
password: newNcAccount.password,
|
||||
urlBase: newNcAccount.serverUrl,
|
||||
userAgent: "Nextcloud-macOS/FileProviderExt",
|
||||
nextcloudVersion: 25,
|
||||
delegate: nil) // TODO: add delegate methods for self
|
||||
Task { @MainActor in
|
||||
let newNcAccount =
|
||||
Account(user: user, id: userId, serverUrl: serverUrl, password: password)
|
||||
guard newNcAccount != ncAccount else { return }
|
||||
ncAccount = newNcAccount
|
||||
ncKit.setup(
|
||||
account: newNcAccount.ncKitAccount,
|
||||
user: newNcAccount.username,
|
||||
userId: newNcAccount.id,
|
||||
password: newNcAccount.password,
|
||||
urlBase: newNcAccount.serverUrl,
|
||||
userAgent: "Nextcloud-macOS/FileProviderExt",
|
||||
nextcloudVersion: 25,
|
||||
delegate: nil) // TODO: add delegate methods for self
|
||||
|
||||
changeObserver = RemoteChangeObserver(
|
||||
remoteInterface: ncKit, changeNotificationInterface: self, domain: domain
|
||||
)
|
||||
ncKit.setup(delegate: changeObserver)
|
||||
signalEnumeratorAfterAccountSetup()
|
||||
changeObserver = RemoteChangeObserver(
|
||||
remoteInterface: ncKit, changeNotificationInterface: self, domain: domain
|
||||
)
|
||||
ncKit.setup(delegate: changeObserver)
|
||||
signalEnumeratorAfterAccountSetup()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue