diff --git a/src/app/features/idle/store/idle.effects.ts b/src/app/features/idle/store/idle.effects.ts index 0b4604c399..037960d9f4 100644 --- a/src/app/features/idle/store/idle.effects.ts +++ b/src/app/features/idle/store/idle.effects.ts @@ -19,6 +19,7 @@ import { } from './idle.actions'; import { distinctUntilChanged, + exhaustMap, filter, first, map, @@ -144,7 +145,8 @@ export class IdleEffects { ofType(openIdleDialog), filter(() => !this._isDialogOpen), tap(() => (this._isDialogOpen = true)), - switchMap(({ enabledSimpleStopWatchCounters, lastCurrentTaskId }) => + // use exhaustMap to prevent opening up multiple dialogs + exhaustMap(({ enabledSimpleStopWatchCounters, lastCurrentTaskId }) => this._matDialog .open(DialogIdleComponent, { restoreFocus: true,