diff --git a/app/helpers/notifications_helper.rb b/app/helpers/notifications_helper.rb index 3f77f622e8..24db107f64 100644 --- a/app/helpers/notifications_helper.rb +++ b/app/helpers/notifications_helper.rb @@ -1,4 +1,8 @@ module NotificationsHelper + def read_when_seen_notifications + ["YouthBirthdayNotification", "VolunteerBirthdayNotification", "EmancipationChecklistReminderNotification"] + end + def notifications_after_and_including_deploy(notifications) latest_deploy_time = Health.instance.latest_deploy_time diff --git a/app/views/notifications/index.html.erb b/app/views/notifications/index.html.erb index 50e61ec9bd..7492303820 100644 --- a/app/views/notifications/index.html.erb +++ b/app/views/notifications/index.html.erb @@ -28,7 +28,7 @@ <% @notifications.each do |notification| %> - <% if ["YouthBirthdayNotification", "VolunteerBirthdayNotification", "EmancipationChecklistReminderNotification"].include? notification.type %> + <% if read_when_seen_notifications.include? notification.type %> <% notification.mark_as_read! %> <% end %> <% end %>