Merge pull request #2889 from evazion/fix-dmail-indexes

Dmails: add indexes on is_read and is_deleted (fix #2886)
This commit is contained in:
Albert Yi
2017-02-21 11:31:20 -08:00
committed by GitHub
3 changed files with 24 additions and 1 deletions

View File

@@ -85,7 +85,7 @@
<%= render "users/ban_notice" %>
<% end %>
<% if CurrentUser.dmail_count.present? && CurrentUser.dmails.unread.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].to_i != CurrentUser.dmails.unread.first.id %>
<%= render "users/dmail_notice" %>
<% end %>