Fix crash due to leaked ProfileHeaderView not having a
mastodonController
This commit is contained in:
parent
2b50609e5c
commit
ca5ac8b826
|
@ -171,9 +171,11 @@ class ProfileHeaderView: UIView {
|
|||
}
|
||||
|
||||
private func updateRelationship() {
|
||||
guard let relationship = mastodonController.persistentContainer.relationship(forAccount: accountID) else {
|
||||
return
|
||||
}
|
||||
// todo: mastodonController should never be nil, but ProfileHeaderViews are getting leaked
|
||||
guard let mastodonController = mastodonController,
|
||||
let relationship = mastodonController.persistentContainer.relationship(forAccount: accountID) else {
|
||||
return
|
||||
}
|
||||
|
||||
followsYouLabel.isHidden = !relationship.followedBy
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue