This could happen when tapping a button quickly two times in the UI. While we had provisions to ensure proper states, these didn't work, because a parallel fetching job would mess with our state allowing the adding code to run more than once.
This can cause other exceptions (e.g. in json parsing) which prevent repo from getting added properly.
Also, when updating the archive for the first time, we can now re-use the downloaded index.
We now hang on to the index file while streaming it for repo preview purposes. This avoids having to re-download that file and we can properly add the repo right away.
This then allows us to bring the user to the list of apps in that repository without it being initially empty.
This led to many hard to debug issues in the past. It is easier to always fetch fresh data and not cache it.
Previously, we needed the cache as a search index. Now, search uses all localizations, so the cache isn't needed anymore.
by inserting zero whitespace between their characters to help the existing sqlite FTS tokenizers to split them up.
We have considered splitting them up only at word boundaries, but after consulting native speakers decided to do splitting by chars instead.
Doing this is a hack, but due to the limitations of tokenizers currently available with sqlite, we saw no better solution. While the ICU tokenizer is available as well, it doesn't handle diacritics in other languages.
The zero whitespace is added to zh, ja and ko locales when saving their text to the database. It happens for app names, summaries and descriptions either when loading a full index or when applying diffs. Tests have been added for both cases.
This now also searches in descriptions, author and package names.
The search also considers all languages now and is insensitive to diacritics in most languages.
The AppMetadataFts needed to be re-created for this to work. A migration and a test for this have been added.
unfortunately, in coil disk caching is not generic, but deeply integrated in their NetworkFetcher, so if you need a custom Fetcher then you need to implement disk caching yourself.
Maybe in the future, we can hook into their NetworkFetcher and try to use our mirror logic around it. This or they make disk caching work for all fetchers.
More often isn't needed and runs into issues with UI refresh rates and worse notification rate-limiting which causes important notifications to get missed
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