Skip to content

Commit

Permalink
Update CommunityResultView.swift
Browse files Browse the repository at this point in the history
  • Loading branch information
Sjmarf committed Oct 1, 2023
1 parent 31647b2 commit 0e7f906
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions Mlem/Views/Tabs/Search/CommunityResultView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -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)
}
}
}

0 comments on commit 0e7f906

Please sign in to comment.