From f72de977de89088267f5b26d52d8d915489b1f3b Mon Sep 17 00:00:00 2001 From: Nathan Mattes Date: Wed, 31 Jan 2024 23:25:57 +0100 Subject: [PATCH] Enable domain-block for User-refactoring (IOS-192) --- Mastodon/Scene/Profile/ProfileViewController.swift | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Mastodon/Scene/Profile/ProfileViewController.swift b/Mastodon/Scene/Profile/ProfileViewController.swift index fdca816ec..051a6d6b3 100644 --- a/Mastodon/Scene/Profile/ProfileViewController.swift +++ b/Mastodon/Scene/Profile/ProfileViewController.swift @@ -421,13 +421,14 @@ extension ProfileViewController { viewModel.$relationship ) .asyncMap { [weak self] user, relationship -> UIMenu? in - guard let self, let relationship else { return nil } + guard let self, let relationship, let domain = user.domainFromAcct else { return nil } let name = user.displayNameWithFallback var menuActions: [MastodonMenu.Action] = [ .muteUser(.init(name: name, isMuting: relationship.muting)), .blockUser(.init(name: name, isBlocking: relationship.blocking)), + .blockDomain(.init(domain: domain, isBlocking: relationship.domainBlocking)), .reportUser(.init(name: name)), .shareUser(.init(name: name)), ]