mirror of
https://github.com/discourse/discourse.git
synced 2025-03-09 14:34:35 +00:00
FIX: clear notification bubble when notification is read
This commit is contained in:
parent
e848ea5a99
commit
d0337e7f5e
@ -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…
x
Reference in New Issue
Block a user