Skip to content

"No internet" banner on main, categories, and updates screen

Adds a 'No internet' banner, which is styled the same as the 'Updating repositories'. When the relevant parent view (main, categories or updates) is attached to the screen, the banner will start listening for network state changes.

This is a rebasing and simplification of !455 (closed), which only includes the first stage. The more complex "Queue for download" functionality will be in a subsequent MR. The other simplification was to remove the commit which extracted the FLAG_NET_* constants into an enum. A comment in that MR mentioned that the enum could be renamed to match the SDK constants, but then I realised that after doing so, the extracting of those constants offered no tangible benefit in the code, so I've reverted to using the current constants that are already in F-Droid.

Note that upon first installing F-Droid, if you open it without a network connection, it will correctly show "No internet", but the "Updating repositories" banner will stay there even after the update fails due to lack of connectivity. That is not a bug introduced in this branch, that behaviour already exists (a sticky "Updating repositories" banner which isn't correctly removed), and can be fixed separately.

Merge request reports