From 9437dd69603037e52398a075f08b556c65b3f1a4 Mon Sep 17 00:00:00 2001 From: Shadowfacts Date: Tue, 2 Oct 2018 20:04:41 -0400 Subject: [PATCH] Don't show relationship label for the user's own account --- .../ProfileHeaderTableViewCell.swift | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/Tusker/Views/Profile Header/ProfileHeaderTableViewCell.swift b/Tusker/Views/Profile Header/ProfileHeaderTableViewCell.swift index 386bcb51..2a5798d4 100644 --- a/Tusker/Views/Profile Header/ProfileHeaderTableViewCell.swift +++ b/Tusker/Views/Profile Header/ProfileHeaderTableViewCell.swift @@ -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) + } } } }