2
2
mirror of https://github.com/mastodon/mastodon-ios synced 2025-04-11 22:58:02 +02:00

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

@ -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
}