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 =
|
Task { @MainActor in
|
||||||
Account(user: user, id: userId, serverUrl: serverUrl, password: password)
|
let newNcAccount =
|
||||||
guard newNcAccount != ncAccount else { return }
|
Account(user: user, id: userId, serverUrl: serverUrl, password: password)
|
||||||
ncAccount = newNcAccount
|
guard newNcAccount != ncAccount else { return }
|
||||||
ncKit.setup(
|
ncAccount = newNcAccount
|
||||||
account: newNcAccount.ncKitAccount,
|
ncKit.setup(
|
||||||
user: newNcAccount.username,
|
account: newNcAccount.ncKitAccount,
|
||||||
userId: newNcAccount.id,
|
user: newNcAccount.username,
|
||||||
password: newNcAccount.password,
|
userId: newNcAccount.id,
|
||||||
urlBase: newNcAccount.serverUrl,
|
password: newNcAccount.password,
|
||||||
userAgent: "Nextcloud-macOS/FileProviderExt",
|
urlBase: newNcAccount.serverUrl,
|
||||||
nextcloudVersion: 25,
|
userAgent: "Nextcloud-macOS/FileProviderExt",
|
||||||
delegate: nil) // TODO: add delegate methods for self
|
nextcloudVersion: 25,
|
||||||
|
delegate: nil) // TODO: add delegate methods for self
|
||||||
changeObserver = RemoteChangeObserver(
|
|
||||||
remoteInterface: ncKit, changeNotificationInterface: self, domain: domain
|
changeObserver = RemoteChangeObserver(
|
||||||
)
|
remoteInterface: ncKit, changeNotificationInterface: self, domain: domain
|
||||||
ncKit.setup(delegate: changeObserver)
|
)
|
||||||
signalEnumeratorAfterAccountSetup()
|
ncKit.setup(delegate: changeObserver)
|
||||||
|
signalEnumeratorAfterAccountSetup()
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue