Skip to content

Commit

Permalink
Fix snackbar service
Browse files Browse the repository at this point in the history
  • Loading branch information
nwmac committed Dec 4, 2020
1 parent ab21c02 commit 278413b
Showing 1 changed file with 2 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -47,11 +47,7 @@ export class SnackBarService {
}

private trackSnackBar(snackBar: MatSnackBarRef<SimpleSnackBar>) {
snackBar.afterOpened().pipe(first()).subscribe(() => {
this.snackBars.push(snackBar);
});
snackBar.afterDismissed().pipe(first()).subscribe(() => {
this.snackBars.shift();
});
this.snackBars.push(snackBar);
snackBar.afterDismissed().pipe(first()).subscribe(() => this.snackBars.shift());
}
}

0 comments on commit 278413b

Please sign in to comment.