We were fetching information on all installed packages and doing a linear
search. Which is silly and inefficient since we can directly fetch information
on a single installed package by id.
If it doesn't result in any version being marked as suggested, e.g. because it
is higher than 0 but lower than any available version, we end up with a NULL
suggestedVercode.
Run the Latest() algorithm after the Upstream() one, and have it pick up those
cases too by adding "OR suggestedVercode IS NULL". This way, we treat invalid
upstreamVercode values as if they were NULL.
Also some cleanup of comments.
Fixes#371.
Materialize app list
Improve the look of app list items. Note that compact mode is removed because it does not make much sense, see the screenshots.
Before (default layout, compact layout):


After:


Affects #471 and #467. Those bugs will still be relevant because there are other places with wrong padding and font style.
See merge request !157
If getSystemService(Context.DOWNLOAD_SERVICE) returns null, we should not go
ahead with using AsyncDownloaderFromAndroid. This would result in NPE and
crashes.
Fixes#442.
As the comment says, this should not be on until it can be opted out from. The
biggest problem is unwanted repo updates, e.g. when a user is on a mobile
connection.
Fixes#435.
The idea was good, but it applied the second-precise date format everywhere.
This broke dates on apps and apks, which have the format yyyy-MM-dd on the
index.
Fix this by having two sets of funcs in Utils, one for dates (precise to a
day) and one for times (precise to a second). We should use the latter for
dates we ourselves measure, like the last repo update time.