Repository navigation
fix(fdroid): stream index-v1.jar with mirror failover, IzzyOnDroid, disk cache, and reactive UI merge - #9
Merged
Conversation
…isk cache, and reactive UI merge Co-authored-by: arena-agent <297053741+arena-agent@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Summary
Fixes the F-Droid catalogue integration so that thousands of open-source apps and games load reliably across Home, Apps, Games, Categories, Top Charts, and Search, modeled directly after Droid-ify (
IndexDownloader.kt,RepositoryUpdater.kt,V1Syncable.kt,IndexV1Parser.kt,IndexConverter.kt) and the official F-Droid client (IndexV1Updater.kt,AppV1.kt,KnownRepos.kt).Root Causes Fixed
index-v1.jar(~8.8 MB compressed ZIP/JAR) instead of rawindex-v1.json(~40+ MB) with a 120s timeout<repo>/index-v1.jarand extractindex-v1.jsonfrom the JAR archive. Previously,FdroidCatalogfetched raw uncompressedindex-v1.json(~40+ MB) with a hard.callTimeout(120, TimeUnit.SECONDS), which killed the download mid-stream on any connection averaging under ~350 KB/s.FdroidCatalog.catalog()previously executed the network download directly inside the caller's coroutine while holding aMutex. When a tab switch or re-refresh cancelled the first caller's coroutine, the download was aborted for all waiting screens. Downloads now run inFdroidCatalog's ownSupervisorJob() + Dispatchers.IOscope.f-droid.org,de.freedif.org,mirror.cyberbits.eu,ftp.fau.de,mirrors.dotsrc.org,ftp.agdsn.de,mirror.fcix.net,mirror.freedif.org,ftp.gwdg.de,ftp.lysator.liu.se) using a staggered Happy-Eyeballs strategy so a slow primary server never blocks loading.https://apt.izzysoft.de/fdroid/repo/index-v1.jar, ~1.6 MB) in parallel and emits progressively viacatalogFlowas soon as the fastest repo or disk cache is ready, then upgrades seamlessly when both repos finish (~4,700+ unique apps)..jarindexes incacheDir/fdroid/for instant (<500ms) startup on subsequent launches.HomeScreenshelf filtering, reactiveStoreViewModelstate merging, and category aliasesfirstPartyPackagesinHomeScreen.ktso mergedsource == "F-Droid"apps do not filter themselves out of the"Open-source picks"shelf.observeFdroidUpdates()inStoreViewModelsohome,apps,games,charts,categoryApps, andsearchResultsautomatically re-merge wheneverfdroidUpdatesemits.nativecodevsBuild.SUPPORTED_ABIS) +suggestedVersionCodeselection,lastUpdateddescending sorting, HTML tag/entity cleanup, ISO-8601 timestamps, multi-locale icon/screenshot resolution, and full category alias matching.ApkDownloadServicewhen downloading F-Droid APKs.Test Plan
FdroidIndexTest.ktfor.jarZIP archive streaming (parseSourceandparseFile),index-v2.jsonparsing,nativecodeABI filtering,lastUpdatedsorting, HTML description cleanup, screenshot URL resolution, and category alias matching.