This repository has been archived by the owner on Feb 27, 2023. It is now read-only.
Remove initialisation dialog box if network error #346
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Whilst NOOBS is establishing which images are available to install (via local SD card or over the network) it displays the "Please wait while NOOBS initialises" dialog box.
If the Pi is NOT connected to the internet, this box is hidden after a timeout as the network is not up.
If the Pi IS connected to the internet, but there is a problem downloading the distribution file, then the dialog box is hidden and the "Error downloading distribution list from Internet" message box is shown.
However, a problem occurs if the user has the Pi connected to a local network but without access to the download server. Then it is possible that the download error will occur before the local images have even been looked at in populate(). In this situation, the "Error downloading distribution list from Internet" message box is shown, but the "Please wait while NOOBS initialises" dialog box is never hidden due to this race condition. (It happens to me a lot when I am using it locally connected to my laptop but not the internet)
This pull request fixes this race condition to ensure the dialog box is hidden after the timeout if there was an error downloading the list. I imagine it could be solved in other ways (creating the dialog box earlier for example, but this worked for me.