Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: removed state change notifications #1123

Merged
merged 2 commits into from
Jan 11, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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": {
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@lidel do I need to remove from other locales too? I see this is the source file for all transifex translations.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Removing from /en/ is enough – it will be removed from other ones the next time sync is performed. 👍

"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