Automatically check for updates after regaining an Internet connection
Now that we support browsing offline in AppCenter, you can get into a weird state:
- Open AppCenter with no Internet connection
- Get an error about not being able to fetch updates (#1156)
- Ignore it
- Reconnect to the Internet
Instead of checking for updates when regaining an Internet connection, you're stuck without updates as if you're still offline.
I spotted code that's supposed to handle this already: https://github.com/elementary/appcenter/blob/9165da251bcde7963c6b0895ffcf005d5bf5627f/src/Application.vala#L152-L154
Do we know for sure it doesn't already work?
@davidmhewitt I mean, in master I can reliable reproduce this:
- Ensure there are some outstanding updates
- Log in with network disconnected (or kill AppCenter, disconnect network, and start AppCenter again)
- Reconnect network
- See the infobar go away
- No updates ever appear, and the homepage never updates
If I restart AppCenter with the network connected, the homepage loads correctly and updates appear again.
Fixed in #2314