Brummolix / AutoarchiveReloaded

Thunderbird extension for autoarchiving mails
Other
19 stars 6 forks source link

Detect offline mode #80

Closed jobisoft closed 2 years ago

jobisoft commented 2 years ago

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 2 years ago

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 2 years ago

Thanks for the feedback. Closing as invalid.

nxmndr commented 3 months ago

Does it stop & warn if the connection breaks during archiving ?

nxmndr commented 3 months ago

Furthermore, just prevent archiving (or popup confirmation with a big warning) if there is no internet connection. I think with both these points covered there would be no more archive doubles issue ?