Skip to content

fix(appupdates): recheck the forced update when the minimum version changes - #1802

Merged
bmc08gt merged 1 commit into
code/cashfrom
fix/appupdates-recheck-min-version
Oct 17, 2026
Merged

bmc08gt merged 1 commit into
code/cashfrom
fix/appupdates-recheck-min-version

Conversation

@bmc08gt

@bmc08gt bmc08gt commented Oct 17, 2026

Copy link
Copy Markdown
Collaborator

A minimum version raised while the app is in the background doesn't block the app when it comes back, only on the next cold start.

Both update checks already run on every resume. The forced check compares against the minimum version cached from the last flag fetch, and the fetch started by that same resume (RealSessionController.onAppInForeground) finishes after the check has already passed. Nothing ran the check again.

GooglePlayAppUpdateController now watches minimumVersion.effectiveValue and runs checkForUpdate() when it changes. It drops the first value, so creating the controller doesn't add a check the resume hook isn't already making.

ForcedUpdateTest gets two cases: raising the minimum after a check shows the gate, and creating the controller checks nothing on its own. The first fails without the change.

…hanges

The forced-update check on resume reads the minimum version cached from the
last flag fetch. The fetch that runs on the same resume lands after the check
has passed, so a minimum raised while the app was backgrounded only blocked the
app on the next cold start.

The controller now runs the check again whenever the minimum version changes.
It skips the first value so building the controller does not check on its own.
@bmc08gt bmc08gt self-assigned this Oct 17, 2026
@github-actions github-actions Bot added the type: fix Bug fix label Oct 17, 2026
@bmc08gt
bmc08gt merged commit b6c93db into code/cash Oct 17, 2026
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

type: fix Bug fix

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant