Dont run timers once a plan is finished

This commit is contained in:
Brandon Presley 2024-02-18 00:49:56 +13:00
parent d89e307950
commit 8162724328
1 changed files with 2 additions and 0 deletions

View File

@ -128,6 +128,8 @@ export default function StartPlan() {
const canNotify = await check(PERMISSIONS.ANDROID.POST_NOTIFICATIONS);
if (canNotify === RESULTS.DENIED)
await request(PERMISSIONS.ANDROID.POST_NOTIFICATIONS);
if (isNaN(exercise.total) ? 0 : exercise.total === best.sets - 1 && selected === exercises.length - 1)
return
NativeModules.AlarmModule.timer(milliseconds, `${exercise.name} (${exercise.total + 1}/${best.sets})`);
};