From f8de6f9e1008529788e985f73825545a72b92db3 Mon Sep 17 00:00:00 2001 From: Shadowfacts Date: Sat, 19 Nov 2022 14:10:19 -0500 Subject: [PATCH] Fix follow/block/mute actions showing up on user's own account --- Tusker/Screens/Utilities/Previewing.swift | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Tusker/Screens/Utilities/Previewing.swift b/Tusker/Screens/Utilities/Previewing.swift index 465f3f7a..fe6ec91b 100644 --- a/Tusker/Screens/Utilities/Previewing.swift +++ b/Tusker/Screens/Utilities/Previewing.swift @@ -66,7 +66,8 @@ extension MenuActionProvider { ] var suppressSection: [UIMenuElement] = [] - if accountID != loggedInAccountID { + if let ownAccount = mastodonController.account, + accountID != ownAccount.id { actionsSection.append(relationshipAction(accountID: accountID, mastodonController: mastodonController, builder: { [unowned self] in self.followAction(for: $0, mastodonController: $1) })) suppressSection.append(relationshipAction(accountID: accountID, mastodonController: mastodonController, builder: { [unowned self] in self.blockAction(for: $0, mastodonController: $1) })) suppressSection.append(relationshipAction(accountID: accountID, mastodonController: mastodonController, builder: { [unowned self] in self.muteAction(for: $0, mastodonController: $1) }))