Enable domain-block for User-refactoring (IOS-192)

This commit is contained in:
Nathan Mattes 2024-01-31 23:25:57 +01:00
parent 53973bb4d9
commit f72de977de
1 changed files with 2 additions and 1 deletions

View File

@ -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)),
]