Merge branch 'master' of git.aiterp.net:stian/trimlog-ykonsole-chrome-extension
This commit is contained in:
@@ -121,7 +121,7 @@ export const CentreBoi = () => {
|
||||
useKey(["H", "h"], () => showHide());
|
||||
|
||||
useKey("*", () => {
|
||||
if (state === "started") {
|
||||
if (state === "started" || state === "connected") {
|
||||
toggleCooldown();
|
||||
}
|
||||
});
|
||||
|
||||
@@ -51,9 +51,13 @@ export const StatusContextProvider = ({children}) => {
|
||||
if (cooldownMin === -1) {
|
||||
setWorkout(await updateCooldownMins(workout, minutes + 1));
|
||||
} else if (minutes < cooldownMin) {
|
||||
setWorkout(await updateCooldownMins(workout, -1));
|
||||
if (state === "connected") {
|
||||
setWorkout(await updateCooldownMins(workout, minutes));
|
||||
} else {
|
||||
setWorkout(await updateCooldownMins(workout, -1));
|
||||
}
|
||||
}
|
||||
}, [workout, workoutStatus]);
|
||||
}, [workout, workoutStatus, state]);
|
||||
|
||||
useEffect(() => {
|
||||
if (bikes !== null && bikes.length === 1) {
|
||||
|
||||
Reference in New Issue
Block a user