Repository navigation
Log a finished swim before the mandatory update - #99
Merged
Merged
Conversation
A pure function picks between loading, the pool stay screen, the update, sign-in and the app, with tests for every combination. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
The update replaced the whole app, so someone opening PoolTrack after a swim could not log the distance until it was installed, which can take a while on a pool's weak signal. The distance screen now comes first; the update is offered right after it is logged. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Merged
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.
Problem
The mandatory update screen replaced the whole app and came before everything else. Someone who finished a swim, and opened PoolTrack for the first time after a new release was published, saw "Update required" instead of the screen to log how far they swam, and could not log it until the update was downloaded and installed (slow on a pool's weak signal).
Fix
A swim waiting for its distance (the cancel window or the log screen) now comes before the update. The distance is stored with the entry, so the update is offered as soon as it is logged. Only a signed-in account has swims, so signed-out users still get the update first. While it is not yet known whether a swim is waiting, nothing is shown, so the update never flashes up for a moment first.
The order is decided by a small pure function,
appGateinAppGate.kt, with a test for every combination;PoolTrackAppjust follows it.Notes
🤖 Generated with Claude Code