Skip to content

Log a finished swim before the mandatory update - #99

Merged
SamiPr0 merged 2 commits into
mainfrom
fix/log-swim-before-update
Oct 9, 2026
Merged

SamiPr0 merged 2 commits into
mainfrom
fix/log-swim-before-update

Conversation

@SamiPr0

@SamiPr0 SamiPr0 commented Oct 9, 2026

Copy link
Copy Markdown
Owner

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, appGate in AppGate.kt, with a test for every combination; PoolTrackApp just follows it.

Notes

  • The update check still only runs at startup, so nothing changes about when an update is found.
  • Checked on an emulator that the app still starts normally. The swim-then-update path itself is covered by the unit tests, not exercised end to end.
  • This only takes effect for users who have installed a build containing it, so it ships with the next release (it would need a version bump).

🤖 Generated with Claude Code

SamiPr0 and others added 2 commits October 9, 2026 22:19
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>
@SamiPr0
SamiPr0 merged commit b79dc5c into main Oct 9, 2026
3 checks passed
@SamiPr0 SamiPr0 mentioned this pull request Oct 9, 2026
@SamiPr0
SamiPr0 deleted the fix/log-swim-before-update branch October 9, 2026 22:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant