FIX: Some notifications were not clearing properly.
This commit is contained in:
parent
1ac6dd194d
commit
a50edb87ec
|
@ -93,11 +93,10 @@ createWidget('notification-item', {
|
||||||
const contents = new RawHtml({ html: `<div>${Discourse.Emoji.unescape(this.text(notificationType, notName))}</div>` });
|
const contents = new RawHtml({ html: `<div>${Discourse.Emoji.unescape(this.text(notificationType, notName))}</div>` });
|
||||||
const href = this.url();
|
const href = this.url();
|
||||||
const alt = I18n.t(`notifications.alt.${notName}`);
|
const alt = I18n.t(`notifications.alt.${notName}`);
|
||||||
return href ? h('a', { attributes: { href, alt } }, contents) : contents;
|
return href ? h('a', { attributes: { href, alt, 'data-auto-route': true } }, contents) : contents;
|
||||||
},
|
},
|
||||||
|
|
||||||
click(e) {
|
click(e) {
|
||||||
|
|
||||||
this.attrs.set('read', true);
|
this.attrs.set('read', true);
|
||||||
const id = this.attrs.id;
|
const id = this.attrs.id;
|
||||||
Discourse.setTransientHeader("Discourse-Clear-Notifications", id);
|
Discourse.setTransientHeader("Discourse-Clear-Notifications", id);
|
||||||
|
|
Loading…
Reference in New Issue