fix: stop GPS tracking on workout cancellation

The cancel button didn't stop the GPS foreground service, leaving it
running after the workout was dismissed.
This commit is contained in:
2026-03-24 18:30:52 +01:00
parent f4398ddfe8
commit 6357199b42
@@ -755,7 +755,7 @@
<button class="add-exercise-btn" onclick={() => showPicker = true}>
{t('add_exercise', lang)}
</button>
<button class="cancel-btn" onclick={async () => { workout.cancel(); await sync.onWorkoutEnd(); await goto(`/fitness/${sl.workout}`); }}>
<button class="cancel-btn" onclick={async () => { if (gps.isTracking) await gps.stop(); gps.reset(); workout.cancel(); await sync.onWorkoutEnd(); await goto(`/fitness/${sl.workout}`); }}>
{t('cancel_workout', lang)}
</button>
</div>