Repository navigation
Require installing a new release before use - #67
Merged
Merged
Conversation
A newer release used to be offered in a dialog that could be dismissed with "Later". It now replaces the whole app with an "Update required" screen until the update is installed: no Later, no Close. Cancelling a download goes back to the Update button, and a failed download offers Retry only. The app also checks again when it comes back to the foreground, at most every 15 minutes, so a long-running session can't dodge an update. If the check can't reach GitHub, e.g. offline at the pool, the app stays usable so the pass can still be shown at the entrance. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Ships mandatory updates. Phones on 1.1.1 see it as a normal update offer; from 1.2.0 on, every update is required. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.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.
What changes for the user
When a newer release exists, PoolTrack no longer shows a dismissible dialog. The whole app is replaced by an "Update required" screen until the update is installed:
It shows before sign-in too, so nobody can use the app on an old version.
Rules
RECHECK_INTERVAL_MILLIS). Leaving the app open in the background doesn't dodge an update. It's spaced out to stay far below GitHub's 60 requests/hour limit for unauthenticated calls.Code
UpdateDialogbecomesUpdateRequiredScreen, a full screen in place of anAlertDialog.PoolTrackAppreturns it instead of the rest of the app whileUpdateUiStateisn'tNone.UpdateViewModel:onDismissis removed;onCancelDownloadgoes back toAvailable;onResumere-checks when usable and the last check is old enough;nowclock for tests.Tests
UpdateRequiredScreenTest, 13 tests: no "Later"/"Close", Cancel only while downloading, Retry only on failure, full flow with the view model.UpdateViewModelTest, 19 tests: cancel keeps the update required; re-check before, at and after the interval; no re-check while blocked; a re-check that finds nothing keeps the app usable.MainActivityTest:./gradlew ktfmtCheck check: BUILD SUCCESSFUL.Shipping it
Phones on 1.1.1 still have the old dismissible dialog, so they'll see the release that contains this as a normal "Update available". From that version on, updates are mandatory. To release: bump
appVersionName(e.g.1.2.0), merge, tag.🤖 Generated with Claude Code