Merge pull request #3414 from BrokenEagle/fix-dmail-hide-notice-bug

Fix Dmail so that prior unread mail won't cause notice to appear
This commit is contained in:
Albert Yi
2017-12-13 14:33:58 -08:00
committed by GitHub

View File

@@ -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 %>