mirror of
https://github.com/codeninjasllc/discourse.git
synced 2024-11-23 23:58:31 -05:00
FIX: publish notification state when notifications are read
(this clears green and blue bubbles)
This commit is contained in:
parent
5a47199528
commit
4c0a40f2b0
1 changed files with 4 additions and 1 deletions
|
@ -154,7 +154,10 @@ class ApplicationController < ActionController::Base
|
|||
|
||||
if notifications.present?
|
||||
notification_ids = notifications.split(",").map(&:to_i)
|
||||
Notification.where(user_id: current_user.id, id: notification_ids).update_all(read: true)
|
||||
count = Notification.where(user_id: current_user.id, id: notification_ids, read: false).update_all(read: true)
|
||||
if count > 0
|
||||
current_user.publish_notifications_state
|
||||
end
|
||||
cookies.delete('cn')
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Reference in a new issue