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