From 49ad8d055faeb170770ce97b8e181679405c1217 Mon Sep 17 00:00:00 2001 From: Nishant Arora <1895906+whizzzkid@users.noreply.github.com> Date: Wed, 11 Jan 2023 07:46:32 -0700 Subject: [PATCH] fix: removed state change notifications (#1123) Closes #1091 --- add-on/_locales/en/messages.json | 16 ---------------- add-on/src/lib/ipfs-companion.js | 2 -- 2 files changed, 18 deletions(-) diff --git a/add-on/_locales/en/messages.json b/add-on/_locales/en/messages.json index 83f433673..fd58820cd 100644 --- a/add-on/_locales/en/messages.json +++ b/add-on/_locales/en/messages.json @@ -199,22 +199,6 @@ "message": "Error while importing IPFS Resource", "description": "A title of system notification (notify_fileCpImportErrorTitle)" }, - "notify_apiOnlineTitle": { - "message": "IPFS API is Online", - "description": "A title of system notification (notify_apiOnlineTitle)" - }, - "notify_apiOnlineAutomaticModeMsg": { - "message": "Automatic Mode: Custom gateway redirect is active", - "description": "A message in system notification (notify_apiOnlineAutomaticModeMsg)" - }, - "notify_apiOfflineTitle": { - "message": "IPFS API is Offline", - "description": "A title of system notification (notify_apiOfflineTitle)" - }, - "notify_apiOfflineAutomaticModeMsg": { - "message": "Automatic Mode: Public gateway will be used as a fallback", - "description": "A message in system notification (notify_apiOfflineAutomaticModeMsg)" - }, "notify_importErrorTitle": { "message": "Unable to Import via IPFS API", "description": "A title of system notification (notify_importErrorTitle)" diff --git a/add-on/src/lib/ipfs-companion.js b/add-on/src/lib/ipfs-companion.js index 1c1daa690..85627caa3 100644 --- a/add-on/src/lib/ipfs-companion.js +++ b/add-on/src/lib/ipfs-companion.js @@ -530,11 +530,9 @@ export default async function init () { if (state.automaticMode && state.localGwAvailable) { if (oldPeerCount === offlinePeerCount && newPeerCount > offlinePeerCount && !state.redirect) { await browser.storage.local.set({ useCustomGateway: true }) - await notify('notify_apiOnlineTitle', 'notify_apiOnlineAutomaticModeMsg') reloadIpfsClientOfflinePages(browser, ipfs, state) } else if (newPeerCount === offlinePeerCount && state.redirect) { await browser.storage.local.set({ useCustomGateway: false }) - await notify('notify_apiOfflineTitle', 'notify_apiOfflineAutomaticModeMsg') } } }