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:
@@ -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>
|
||||
|
||||
Reference in New Issue
Block a user