Skip to content

Commit

Permalink
fix: #11619, fix selector
Browse files Browse the repository at this point in the history
  • Loading branch information
barisusakli committed May 21, 2023
1 parent 4b40b44 commit cdeaef6
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions public/src/modules/notifications.js
Expand Up @@ -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);
});
Expand Down

0 comments on commit cdeaef6

Please sign in to comment.