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:
parent
e4578686e3
commit
1cd7bc9105
|
@ -35,12 +35,13 @@ extension RecommendAccountSection {
|
||||||
let cell = tableView.dequeueReusableCell(withIdentifier: String(describing: SuggestionAccountTableViewCell.self)) as! SuggestionAccountTableViewCell
|
let cell = tableView.dequeueReusableCell(withIdentifier: String(describing: SuggestionAccountTableViewCell.self)) as! SuggestionAccountTableViewCell
|
||||||
switch item {
|
switch item {
|
||||||
case .account(let record):
|
case .account(let record):
|
||||||
|
cell.delegate = configuration.suggestionAccountTableViewCellDelegate
|
||||||
context.managedObjectContext.performAndWait {
|
context.managedObjectContext.performAndWait {
|
||||||
guard let user = record.object(in: context.managedObjectContext) else { return }
|
guard let user = record.object(in: context.managedObjectContext) else { return }
|
||||||
cell.configure(user: user)
|
cell.configure(user: user)
|
||||||
}
|
}
|
||||||
|
|
||||||
cell.delegate = configuration.suggestionAccountTableViewCellDelegate
|
|
||||||
}
|
}
|
||||||
return cell
|
return cell
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue