mirror of
https://github.com/NodeBB/NodeBB.git
synced 2025-10-26 16:46:12 +01:00
fix: #11619, fix selector
This commit is contained in:
@@ -74,11 +74,11 @@ define('notifications', [
|
||||
Notifications.handleUnreadButton = function (notifList) {
|
||||
notifList.on('click', '.mark-read', function () {
|
||||
const $this = $(this);
|
||||
const liEl = $this.parents('li[data-nid]');
|
||||
const unread = liEl.hasClass('unread');
|
||||
const nid = liEl.attr('data-nid');
|
||||
const notifEl = $this.parents('[data-nid]');
|
||||
const unread = notifEl.hasClass('unread');
|
||||
const nid = notifEl.attr('data-nid');
|
||||
markNotification(nid, unread, function () {
|
||||
liEl.toggleClass('unread');
|
||||
notifEl.toggleClass('unread');
|
||||
$this.find('.unread').toggleClass('hidden', unread);
|
||||
$this.find('.read').toggleClass('hidden', !unread);
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user