Add a dirty hack to give the backend enough time to process the relationship-change

This commit is contained in:
Nathan Mattes 2023-10-25 14:35:51 +02:00
parent 242f351e10
commit e9c9745277
1 changed files with 4 additions and 0 deletions

View File

@ -111,6 +111,10 @@ extension UserTableViewCellDelegate where Self: NeedsDependency & AuthContextPro
buttonState: state
)
// this is a dirty hack to give the backend enough time to process the relationship-change
// Otherwise the relationship might still be `pending`
try await Task.sleep(for: .seconds(1))
let relationship = try await self.context.apiService.relationship(forAccounts: [account], authenticationBox: authContext.mastodonAuthenticationBox).value.first
let isMe: Bool