Don't show relationship label for the user's own account
This commit is contained in:
parent
a6373f7e10
commit
ed6c371967
|
@ -76,12 +76,15 @@ class ProfileHeaderTableViewCell: UITableViewCell, PreferencesAdaptive {
|
||||||
|
|
||||||
noteLabel.setTextFromHtml(account.note)
|
noteLabel.setTextFromHtml(account.note)
|
||||||
|
|
||||||
if let relationship = MastodonCache.relationship(for: accountID) {
|
if accountID != MastodonController.account.id {
|
||||||
followsYouLabel.isHidden = !relationship.followedBy
|
// don't show relationship label for the user's own account
|
||||||
} else {
|
if let relationship = MastodonCache.relationship(for: accountID) {
|
||||||
MastodonCache.relationship(for: accountID) { relationship in
|
followsYouLabel.isHidden = !relationship.followedBy
|
||||||
DispatchQueue.main.async {
|
} else {
|
||||||
self.followsYouLabel.isHidden = !(relationship?.followedBy ?? false)
|
MastodonCache.relationship(for: accountID) { relationship in
|
||||||
|
DispatchQueue.main.async {
|
||||||
|
self.followsYouLabel.isHidden = !(relationship?.followedBy ?? false)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue