mirror of
https://github.com/finos/SymphonyElectron.git
synced 2024-12-28 09:51:06 -06:00
ELECTRON-1425 & ELECTRON-1405 - Clear displayTimer & move notification to top when setting notification content (#741)
This commit is contained in:
parent
abfda29141
commit
dbd3c05631
@ -170,6 +170,13 @@ class Notification extends NotificationHandler {
|
||||
const displayTime = data.displayTime ? data.displayTime : notificationSettings.displayTime;
|
||||
let timeoutId;
|
||||
|
||||
// Reset the display timer
|
||||
if (notificationWindow.displayTimer) {
|
||||
clearTimeout(notificationWindow.displayTimer);
|
||||
}
|
||||
// Move notification to top
|
||||
notificationWindow.moveTop();
|
||||
|
||||
if (!data.sticky) {
|
||||
timeoutId = setTimeout(async () => {
|
||||
await this.hideNotification(notificationWindow.clientId);
|
||||
|
Loading…
Reference in New Issue
Block a user