Skip to content

Commit

Permalink
fix: removed state change notifications (#1123)
Browse files Browse the repository at this point in the history
Closes #1091
  • Loading branch information
whizzzkid committed Jan 11, 2023
1 parent d439a97 commit 49ad8d0
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 18 deletions.
16 changes: 0 additions & 16 deletions add-on/_locales/en/messages.json
Original file line number Diff line number Diff line change
Expand Up @@ -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)"
Expand Down
2 changes: 0 additions & 2 deletions add-on/src/lib/ipfs-companion.js
Original file line number Diff line number Diff line change
Expand Up @@ -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')
}
}
}
Expand Down

0 comments on commit 49ad8d0

Please sign in to comment.