From 3adc722d1cdd28d87d2724b8952d7ec52d241b52 Mon Sep 17 00:00:00 2001 From: ThibG Date: Mon, 3 Feb 2020 01:53:09 +0100 Subject: Change how unread announcements are handled (#13020) * Change meaning of /api/v1/announcements/:id/dismiss to mark an announcement as read * Change how unread announcements are counted in UI * Add unread marker to announcements and mark announcements as unread as they are displayed * Fixups --- app/controllers/api/v1/announcements_controller.rb | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) (limited to 'app/controllers') diff --git a/app/controllers/api/v1/announcements_controller.rb b/app/controllers/api/v1/announcements_controller.rb index 6724fac2e..1e692ff75 100644 --- a/app/controllers/api/v1/announcements_controller.rb +++ b/app/controllers/api/v1/announcements_controller.rb @@ -19,11 +19,7 @@ class Api::V1::AnnouncementsController < Api::BaseController def set_announcements @announcements = begin - scope = Announcement.published - - scope.merge!(Announcement.without_muted(current_account)) unless truthy_param?(:with_dismissed) - - scope.chronological + Announcement.published.chronological end end -- cgit