This adds the abililty to click on the author's name in the app details if there are at least two app from them in the DB. A button with hint to take a look at the other apps by the dev is also added at the bottom of the app details. When clicked, the AppList is opened with a new `authorName` filter.
With the update to Room 2.7.0 the chunked queries stopped to return distinct values. This is fixed by only processing distinct values when merging the chunked results.
The test case for the chunked quries was also fixed. It did not work properly before because it only tested chunked quries and not the base case which does not need chunked packageInfo
- Rename expectDownloadOfMinRepo() to mockMinRepoDownload() to better describe what it does
- Move repoAdder.fetchRepository into expectMinRepoPreview() to reduce repetition
- Change some remnant example.com to min-v1.org
- Use explicit user-mirror-min-v1.org instead of example.com to make the intention clear
- Add comments to explain what's going on
- Make mockRepoDownload() configurable, to allow easier mocking of other repos in the futures (e.g., of mid and max)
See also fdroid/fdroidclient!1535
This clean up was prompted by the need to write a test for fdroid/fdroidclient!1530
otherwise the v1 repos still relying on them would not re-update and thus the DB miss their data. This can cause unintended breakage like apps not having a preferred repo.
If we are used to update the same repo at almost the same time, a race-condition can happen that tries to apply a diff to an already updated DB. We don't download anything while holding a DB transaction, so the download and check for the repo timestamp happens before we enter the transaction. However, we forgot to re-check the timestamp again within the transaction to be sure the DB state is still as expected.
The structure of the JSON (FeatureV2) and of our internal class AppManifest is different. The latter uses a list of strings instead of objects. The ReflectionDiffer didn't handle this different and was throwing an exception when diffing changing features.
However, the impact of this bug should be small as normally one version has an ID which is its SHA256 hash and thus its features shouldn't change over repo updates. Imaginable is erratic repo creation software though.