Skip to content

Commit 60d74fb

Browse files
authored
fix(service-worker-notify): correct set infinite duration in snackbar (#14)
2 parents 03b990d + 2cf80dd commit 60d74fb

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

packages/service-worker-notify/src/lib/service-worker-notify.ts

+4-4
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ export function serviceWorkerNotifySnackbar(options: {lastNotifyVersion: string;
3232
if (event === 'service_worker_update_found') {
3333
snackbarSignal.notify({
3434
content: 'در حال به‌روزرسانی برنامه...',
35-
duration: -1,
35+
duration: 'infinite',
3636
});
3737
}
3838
else if (event === 'service_worker_first_install') {
@@ -66,7 +66,7 @@ export function serviceWorkerNotifySnackbar(options: {lastNotifyVersion: string;
6666
) {
6767
snackbarSignal.notify({
6868
content: message,
69-
duration: -1,
69+
duration: 'infinite',
7070
addCloseButton: true,
7171
action: {
7272
label: 'مشاهده‌ی تغیرات',
@@ -80,7 +80,7 @@ export function serviceWorkerNotifySnackbar(options: {lastNotifyVersion: string;
8080
else {
8181
snackbarSignal.notify({
8282
content: message,
83-
duration: -1,
83+
duration: 'infinite',
8484
addCloseButton: true,
8585
});
8686
}
@@ -105,7 +105,7 @@ export function serviceWorkerNotifySnackbar(options: {lastNotifyVersion: string;
105105
localStorage.setItem(notifyLocalStorageKey, __package_version__);
106106
snackbarSignal.notify({
107107
content: 'به روز رسانی انجام شد.',
108-
duration: -1,
108+
duration: 'infinite',
109109
action: {
110110
label: 'بارگذاری مجدد',
111111
handler: () => window.location.reload(),

0 commit comments

Comments
 (0)