Make follow work (IOS-157)

The secret is to set the delegate before getting the account. This doesn't feel right.
This commit is contained in:
Nathan Mattes 2023-05-22 13:28:18 +02:00
parent e4578686e3
commit 1cd7bc9105
1 changed files with 2 additions and 1 deletions

View File

@ -35,12 +35,13 @@ extension RecommendAccountSection {
let cell = tableView.dequeueReusableCell(withIdentifier: String(describing: SuggestionAccountTableViewCell.self)) as! SuggestionAccountTableViewCell
switch item {
case .account(let record):
cell.delegate = configuration.suggestionAccountTableViewCellDelegate
context.managedObjectContext.performAndWait {
guard let user = record.object(in: context.managedObjectContext) else { return }
cell.configure(user: user)
}
cell.delegate = configuration.suggestionAccountTableViewCellDelegate
}
return cell
}