reset unread dmail count when using mark all as read (#3574)

This commit is contained in:
Albert Yi
2018-04-26 11:47:07 -07:00
parent 9aafc344fa
commit 990d625ae3

View File

@@ -52,8 +52,7 @@ class DmailsController < ApplicationController
Dmail.visible.unread.each do |x|
x.update_column(:is_read, true)
end
CurrentUser.user.has_mail = false
CurrentUser.user.save
CurrentUser.user.update(has_mail: false, unread_dmail_count: 0)
end
def spam