Skip to content

Commit 6fee31d

Browse files
committed
fix missing permanent snackbars
1 parent da9a643 commit 6fee31d

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

src/app/core/snackbar/snackbar.service.ts

+6-2
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,8 @@ import { MatSnackBar } from '@angular/material/snack-bar'
55
export class SnackbarService {
66
private _snackBar = inject(MatSnackBar)
77

8-
alert(message: string, button = 'OK', timeout = false, timeoutLength = 3000) {
9-
this._displaySnackBar(message, button, 'alert', timeout, timeoutLength)
8+
alert(message: string, button = 'OK', _timeout = false, timeoutLength = 3000) {
9+
this._displaySnackBar(message, button, 'alert', false, timeoutLength)
1010
}
1111

1212
warning(message: string, button = 'OK', timeout = false, timeoutLength = 3000) {
@@ -26,6 +26,10 @@ export class SnackbarService {
2626
this._snackBar.open(message, button,
2727
{ panelClass: `soft-${css_class}-snackbar`, duration: timeoutLength, horizontalPosition: 'center', verticalPosition: 'top' },
2828
)
29+
} else {
30+
this._snackBar.open(message, button,
31+
{ panelClass: `soft-${css_class}-snackbar`, horizontalPosition: 'center', verticalPosition: 'top' },
32+
)
2933
}
3034
}
3135
}

0 commit comments

Comments
 (0)