From b325b85df37a5bf4c3b34cb82afcaccb0c95c80a Mon Sep 17 00:00:00 2001 From: BrokenEagle Date: Fri, 1 Dec 2017 12:51:17 -0800 Subject: [PATCH] Fixed so prior unread dmails won't cause notice to appear --- app/views/layouts/default.html.erb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/views/layouts/default.html.erb b/app/views/layouts/default.html.erb index 968be757e..3b75652dc 100644 --- a/app/views/layouts/default.html.erb +++ b/app/views/layouts/default.html.erb @@ -99,7 +99,7 @@ <%= render "users/ban_notice" %> <% end %> - <% if CurrentUser.has_mail? && CurrentUser.dmails.unread.first.present? && cookies[:hide_dmail_notice].to_i != CurrentUser.dmails.unread.first.id %> + <% if CurrentUser.has_mail? && CurrentUser.dmails.unread.first.present? && (cookies[:hide_dmail_notice].blank? || cookies[:hide_dmail_notice].to_i < CurrentUser.dmails.unread.first.id) %> <%= render "users/dmail_notice" %> <% end %>