diff --git a/src/components/notification-i18n.en.json b/src/components/notification-i18n.en.json index bdf93b8a..8eafe558 100644 --- a/src/components/notification-i18n.en.json +++ b/src/components/notification-i18n.en.json @@ -13,7 +13,6 @@ "error": "{errorMessage}" }, "serviceWorker": { - "success": "Content is cached for offline use.", "update": "New content is available and will be used when all tabs for this page are closed.'" } } diff --git a/src/components/notification-i18n.ts b/src/components/notification-i18n.ts index 75192cd5..c6a157a3 100644 --- a/src/components/notification-i18n.ts +++ b/src/components/notification-i18n.ts @@ -9,7 +9,6 @@ export enum MessageId { BleGattServiceNotFound = 'ble.gattServiceNotFound', BleNoWebBluetooth = 'ble.noWebBluetooth', ProgramChanged = 'editor.programChanged', - ServiceWorkerSuccess = 'serviceWorker.success', ServiceWorkerUpdate = 'serviceWorker.update', YesReloadProgram = 'editor.yesReloadProgram', MpyError = 'mpy.error', diff --git a/src/sagas/notification.test.ts b/src/sagas/notification.test.ts index 60bb024b..2838c9b2 100644 --- a/src/sagas/notification.test.ts +++ b/src/sagas/notification.test.ts @@ -34,7 +34,6 @@ test.each([ add('warning', 'message'), add('error', 'message', 'url'), didUpdate({} as ServiceWorkerRegistration), - didSucceed({} as ServiceWorkerRegistration), ])('actions that should show notification: %o', async (action: Action) => { const getToasts = jest.fn().mockReturnValue([]); const show = jest.fn(); @@ -62,6 +61,7 @@ test.each([ test.each([ bleDidFailToConnect({ reason: BleDeviceFailToConnectReasonType.Canceled }), bootloaderDidFailToConnect(BootloaderConnectionFailureReason.Canceled), + didSucceed({} as ServiceWorkerRegistration), ])('actions that should not show a notification: %o', async (action: Action) => { const getToasts = jest.fn().mockReturnValue([]); const show = jest.fn(); diff --git a/src/sagas/notification.ts b/src/sagas/notification.ts index aafec817..4af52ee9 100644 --- a/src/sagas/notification.ts +++ b/src/sagas/notification.ts @@ -237,10 +237,6 @@ function* showServiceWorkerUpdate(): Generator { ); } -function* showServiceWorkerSuccess(): Generator { - yield* showSingleton(Level.Info, MessageId.ServiceWorkerSuccess); -} - export default function* (): Generator { yield takeEvery( BleDeviceActionType.DidFailToConnect, @@ -254,5 +250,4 @@ export default function* (): Generator { yield takeEvery(MpyActionType.DidFailToCompile, showCompilerError); yield takeEvery(NotificationActionType.Add, addNotification); yield takeEvery(ServiceWorkerActionType.DidUpdate, showServiceWorkerUpdate); - yield takeEvery(ServiceWorkerActionType.DidSucceed, showServiceWorkerSuccess); }