Merge branch 'develop' into remove_status
This commit is contained in:
commit
e6ba8db5b6
|
@ -127,10 +127,15 @@ extension SearchResultViewModel.State {
|
||||||
|
|
||||||
let accounts = searchResults.accounts
|
let accounts = searchResults.accounts
|
||||||
|
|
||||||
let relationships = try await viewModel.context.apiService.relationship(
|
let relationships: [Mastodon.Entity.Relationship]
|
||||||
forAccounts: accounts,
|
if accounts.isNotEmpty {
|
||||||
authenticationBox: viewModel.authContext.mastodonAuthenticationBox
|
relationships = try await viewModel.context.apiService.relationship(
|
||||||
).value
|
forAccounts: accounts,
|
||||||
|
authenticationBox: viewModel.authContext.mastodonAuthenticationBox
|
||||||
|
).value
|
||||||
|
} else {
|
||||||
|
relationships = []
|
||||||
|
}
|
||||||
|
|
||||||
let isNoMore = accounts.isEmpty && statusIDs.isEmpty
|
let isNoMore = accounts.isEmpty && statusIDs.isEmpty
|
||||||
|
|
||||||
|
|
|
@ -46,8 +46,9 @@ extension APIService {
|
||||||
// FIXME: This is a dirty hack to make the performance-stuff work.
|
// 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
|
// 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.
|
// it when we need it to display on the home timeline.
|
||||||
|
// We need this (also) for the Account-list, but it might be the wrong place. App Startup might be more appropriate
|
||||||
for authentication in AuthenticationServiceProvider.shared.authentications {
|
for authentication in AuthenticationServiceProvider.shared.authentications {
|
||||||
_ = try await accountInfo(domain: authentication.domain,
|
_ = try? await accountInfo(domain: authentication.domain,
|
||||||
userID: authentication.userID,
|
userID: authentication.userID,
|
||||||
authorization: Mastodon.API.OAuth.Authorization(accessToken: authentication.userAccessToken)).value
|
authorization: Mastodon.API.OAuth.Authorization(accessToken: authentication.userAccessToken)).value
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue