Don't show relationship label for the user's own account

This commit is contained in:
Shadowfacts 2018-10-02 20:04:41 -04:00
parent 3ae13319a3
commit 9437dd6960
Signed by: shadowfacts
GPG Key ID: 94A5AB95422746E5
1 changed files with 9 additions and 6 deletions

View File

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