Detect offline mode
jobisoft opened this issue · 4 comments
jobisoft commented
I started to debug your add-on due to bug 1794561.
I saw that you pop a warning for missing internet.
You can detect "offline mode" in background script or in the popup script (if this is what the popup warning is about):
window.addEventListener('online', (event) => {
console.log("online", event)
console.log(navigator.onLine)
});
window.addEventListener('offline', (event) => {
console.log("offline", event)
console.log(navigator.onLine)
});
We also plan to detect if IMAP connections are actually working or not (in online mode), but there is no API yet.
Brummolix commented
I once added the popup because of the Thunderbird behavior descibed in https://bugzilla.mozilla.org/show_bug.cgi?id=956598
This was not the same as the offline mode.
I think as long as there is this behavior the popup makes sense (even if it is ugly especially for people having good/permanent internet connection)
jobisoft commented
Thanks for the feedback. Closing as invalid.