FIX: Some notifications were not clearing properly.

This commit is contained in:
Robin Ward 2016-04-29 16:42:04 -04:00
parent 1ac6dd194d
commit a50edb87ec
No known key found for this signature in database
GPG key ID: 0E091E2B4ED1B83D

View file

@ -93,11 +93,10 @@ createWidget('notification-item', {
const contents = new RawHtml({ html: `<div>${Discourse.Emoji.unescape(this.text(notificationType, notName))}</div>` });
const href = this.url();
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) {
this.attrs.set('read', true);
const id = this.attrs.id;
Discourse.setTransientHeader("Discourse-Clear-Notifications", id);