Download not one but all authenticated users at start
This commit is contained in:
parent
081727865f
commit
c5cfca93ea
|
@ -47,12 +47,17 @@ extension APIService {
|
|||
// FIXME: This is a dirty hack to make the performance-stuff work.
|
||||
// Problem is, that we don't persist the user on disk anymore. So we have to fetch
|
||||
// it when we need it to display on the home timeline.
|
||||
_ = try await authenticatedUserInfo(authenticationBox: authenticationBox).value
|
||||
for authentication in AuthenticationServiceProvider.shared.authentications {
|
||||
_ = try await accountInfo(domain: authentication.domain,
|
||||
userID: authentication.userID,
|
||||
authorization: Mastodon.API.OAuth.Authorization(accessToken: authentication.userAccessToken)).value
|
||||
}
|
||||
|
||||
NotificationCenter.default.post(name: .userFetched, object: nil)
|
||||
|
||||
try await managedObjectContext.performChanges {
|
||||
guard let me = authenticationBox.authentication.user(in: managedObjectContext) else {
|
||||
assertionFailure()
|
||||
assertionFailure()
|
||||
return
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue