Refresh only newly imported subscriptions - #6237
Open
eliotcougar wants to merge 3 commits into
Open
eliotcougar wants to merge 3 commits into
eliotcougar wants to merge 3 commits into
Conversation
eliotcougar
marked this pull request as ready for review
September 15, 2026 16:57
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
Adding a subscription calls
updateConfigViaSubAll(), so importing an eleventh subscription downloads the first ten again, sequentially. Fetch only subscriptions created by the current import. Build the existing-URL lookup once per batch and serialize lookup and creation to prevent duplicates across overlapping imports; download outside that lock.Check both subscription payload and index writes, roll back failed saves, and download only successfully saved entries. Return named import results with saved group IDs and initial update outcomes. Report failed or partially successful imports accurately using existing localized messages, while retaining failed-download subscriptions for retry. Refresh affected group caches and the All group, preserving unrelated cached profiles. Correct the nested-lock return that previously bypassed cached data.
Route URL/share and scanner-shortcut imports through
MainActivityand itsMainViewModelso the work survives the importing activity closing and main-screen recreation. Consume each payload once, retain its target group and append mode, and keep loading visible until overlapping imports finish. Preserve Base64 input, URL-fragment names, and escaped paths/query values by decoding only the outer install URL parameter. Explicit Update All retains its existing behavior.Related to #6233.
Validation
:app:compilePlaystoreDebugKotlin,:app:assemblePlaystoreDebug, and:app:assemblePlaystoreReleasepassed.Not run: physical-device, physical-camera QR, live Internet/proxy checks, and a fresh standalone lint run for the latest commit. Network validation used controlled local HTTP endpoints. An earlier lint run reported four existing
NewApierrors inRootManager,RootShell, and day/night themes; those files are unchanged from upstream.