fix: stop GPS tracking on workout cancellation
Some checks failed
Android APK / build (push) Failing after 4m48s
CI / update (push) Has been cancelled

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 fe49c5b997
commit 6685e5731c

View File

@@ -755,7 +755,7 @@
<button class="add-exercise-btn" onclick={() => showPicker = true}> <button class="add-exercise-btn" onclick={() => showPicker = true}>
{t('add_exercise', lang)} {t('add_exercise', lang)}
</button> </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)} {t('cancel_workout', lang)}
</button> </button>
</div> </div>