From 0e7f9060ac21a2066997e5636cb8e252fc81e5f7 Mon Sep 17 00:00:00 2001 From: Sjmarf <78750526+Sjmarf@users.noreply.github.com> Date: Sun, 1 Oct 2023 15:57:21 +0100 Subject: [PATCH] Update CommunityResultView.swift --- Mlem/Views/Tabs/Search/CommunityResultView.swift | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/Mlem/Views/Tabs/Search/CommunityResultView.swift b/Mlem/Views/Tabs/Search/CommunityResultView.swift index cdc224556..f60db7fd6 100644 --- a/Mlem/Views/Tabs/Search/CommunityResultView.swift +++ b/Mlem/Views/Tabs/Search/CommunityResultView.swift @@ -89,15 +89,13 @@ struct CommunityResultView: View { .clipShape(RoundedRectangle(cornerRadius: 8)) } .contextMenu { - Button { + Button(role: community.subscribed ? .destructive : nil) { Task(priority: .userInitiated) { await subscribe() } } label: { Label( community.subscribed ? "Unsubscribe" : "Subscribe", - systemImage: community.subscribed ? Icons.unsubscribe : Icons.subscribe - ) + systemImage: community.subscribed ? Icons.unsubscribe : Icons.subscribe) } - .toolbarRole(community.subscribed ? .destructive : nil) } } }