Fixed so prior unread dmails won't cause notice to appear

This commit is contained in:
BrokenEagle
2017-12-01 12:51:17 -08:00
parent 2000719227
commit b325b85df3

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