Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
return this;
}
this._mostRecentIssueId = issues[0].id;
notifierScreen.setNotificationIcon(this._index);
// Display the latest issue's subject only
nodeNotifier.notify({
title: this.buildNotificationTitle(issueCount, isOverPage),
message: issues[0].subject,
wait: true
});
nodeNotifier.removeAllListeners();
nodeNotifier.once('click', () => {
shell.openExternal(`${this._settings.url}/issues/${this._mostRecentIssueId}`);
notifierScreen.setNormalIcon();
nodeNotifier.removeAllListeners();
});
nodeNotifier.once('timeout', () => {
nodeNotifier.removeAllListeners();
});
return this;
}
// Display the latest issue's subject only
nodeNotifier.notify({
title: this.buildNotificationTitle(issueCount, isOverPage),
message: issues[0].subject,
wait: true
});
nodeNotifier.removeAllListeners();
nodeNotifier.once('click', () => {
shell.openExternal(`${this._settings.url}/issues/${this._mostRecentIssueId}`);
notifierScreen.setNormalIcon();
nodeNotifier.removeAllListeners();
});
nodeNotifier.once('timeout', () => {
nodeNotifier.removeAllListeners();
});
return this;
}
let notifierOption = {
appIcon : this.icon,
title : options.title || this.title,
subtitle : options.subtitle,
contentImage : options.image,
message : options.message,
timeout : 10
};
if ( callbacks.length > 0 ) {
notifierOption.wait = true;
}
if ( typeof callbacks['click'] === 'function' ) {
notifier.once('click', callbacks['click']);
}
notifier.notify(notifierOption);
}
}