@@ -5,8 +5,8 @@ import { MatSnackBar } from '@angular/material/snack-bar'
5
5
export class SnackbarService {
6
6
private _snackBar = inject ( MatSnackBar )
7
7
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 )
10
10
}
11
11
12
12
warning ( message : string , button = 'OK' , timeout = false , timeoutLength = 3000 ) {
@@ -26,6 +26,10 @@ export class SnackbarService {
26
26
this . _snackBar . open ( message , button ,
27
27
{ panelClass : `soft-${ css_class } -snackbar` , duration : timeoutLength , horizontalPosition : 'center' , verticalPosition : 'top' } ,
28
28
)
29
+ } else {
30
+ this . _snackBar . open ( message , button ,
31
+ { panelClass : `soft-${ css_class } -snackbar` , horizontalPosition : 'center' , verticalPosition : 'top' } ,
32
+ )
29
33
}
30
34
}
31
35
}
0 commit comments