Comment Settings
<% if @notification_subscription.persisted? %>
Showing thread notifications
You will receive all notifications for this comment and any of your comments in this chain.
<% else %>
Muting thread notifications
All notifications for this comment and any of your comments in the thread are currently muted.
<% end %>
<%= form_for(@notification_subscription, url: "/notification_subscriptions/Comment/#{@comment.id}", method: "post", html: { class: "mute-form shrink-0" }) do |f| %>
">
<%= f.submit @notification_subscription.persisted? ? "Mute notifications" : "Unmute notifications", class: "crayons-btn crayons-btn--secondary #{@notification_subscription.persisted? ? 'mute' : 'unmute'}" %>
<% end %>
<% if NotificationSubscription.where(user_id: current_user, notifiable_type: "Article", notifiable_id: @comment.commentable_id, config: "all_comments").any? %>
Subscription
You are still subscribed to all comments in the broader thread, which will mean you will still receive notifications for replies to this comment.
<%= form_for(@notification_subscription, url: "/notification_subscriptions/Article/#{@comment.commentable_id}", method: "post", html: { class: "mute-form" }) do |f| %>
<%= f.submit "Unsubscribe from parent post", class: "crayons-btn crayons-btn--secondary" %>
<% end %>
<% end %>