FIX: Display first notification spotlight only once each page load.

This commit is contained in:
Guo Xiang Tan 2016-11-15 14:42:35 +08:00
parent 63d9d4f301
commit 68f9c7142f
1 changed files with 6 additions and 1 deletions

View File

@ -20,6 +20,8 @@ const dropdown = {
}
};
let hideRingBackdrop = false;
createWidget('header-notifications', {
settings: {
avatarSize: 'medium'
@ -44,7 +46,10 @@ createWidget('header-notifications', {
if (!!unreadPMs) {
if (!currentUser.get('read_first_notification')) {
contents.push(h('span.ring'));
if (!attrs.active && !hideRingBackdrop) {
contents.push(h('span.ring-backdrop'));
hideRingBackdrop = true;
}
};
contents.push(this.attach('link', { action: attrs.action,