Fix follow/block/mute actions showing up on user's own account

This commit is contained in:
Shadowfacts 2022-11-19 14:10:19 -05:00
parent ab47fa776e
commit f8de6f9e10
1 changed files with 2 additions and 1 deletions

View File

@ -66,7 +66,8 @@ extension MenuActionProvider {
] ]
var suppressSection: [UIMenuElement] = [] 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) })) 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.blockAction(for: $0, mastodonController: $1) }))
suppressSection.append(relationshipAction(accountID: accountID, mastodonController: mastodonController, builder: { [unowned self] in self.muteAction(for: $0, mastodonController: $1) })) suppressSection.append(relationshipAction(accountID: accountID, mastodonController: mastodonController, builder: { [unowned self] in self.muteAction(for: $0, mastodonController: $1) }))