mirror of
https://github.com/mattermost/mattermost.git
synced 2025-02-25 18:55:24 -06:00
stop ring on pause
This commit is contained in:
@@ -54,6 +54,9 @@ export function ring(name: string) {
|
||||
stopRing();
|
||||
|
||||
currentRing = loopNotificationRing(name);
|
||||
currentRing.addEventListener('pause', () => {
|
||||
stopRing();
|
||||
});
|
||||
}
|
||||
|
||||
export function stopRing() {
|
||||
@@ -75,6 +78,10 @@ export function tryNotificationRing(name: string) {
|
||||
clearTimeout(currentTimer);
|
||||
|
||||
currentTryRing = loopNotificationRing(name);
|
||||
currentTryRing.addEventListener('pause', () => {
|
||||
stopTryNotificationRing();
|
||||
});
|
||||
|
||||
currentTimer = setTimeout(() => {
|
||||
stopTryNotificationRing();
|
||||
}, 5000);
|
||||
|
||||
Reference in New Issue
Block a user