Fix crashing of plans
This commit is contained in:
parent
8a240b78cd
commit
e1a90a98fb
|
@ -72,7 +72,8 @@ export default function StartPlan() {
|
||||||
else toast('Added set', 3000);
|
else toast('Added set', 3000);
|
||||||
if (!settings.alarm) return;
|
if (!settings.alarm) return;
|
||||||
const milliseconds = Number(minutes) * 60 * 1000 + Number(seconds) * 1000;
|
const milliseconds = Number(minutes) * 60 * 1000 + Number(seconds) * 1000;
|
||||||
const args = [milliseconds, !!settings.vibrate, settings.sound];
|
const {vibrate, sound, noSound} = settings;
|
||||||
|
const args = [milliseconds, !!vibrate, sound, !!noSound];
|
||||||
NativeModules.AlarmModule.timer(...args);
|
NativeModules.AlarmModule.timer(...args);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -163,9 +163,9 @@ export const countMany = async (names: string[]): Promise<CountMany[]> => {
|
||||||
const questions = names.map(_ => '?').join(',');
|
const questions = names.map(_ => '?').join(',');
|
||||||
console.log({questions, names});
|
console.log({questions, names});
|
||||||
const select = `
|
const select = `
|
||||||
SELECT workouts.name, COUNT(sets.id) as total, workouts.sets
|
SELECT workouts.name, COUNT(sets.id) as total
|
||||||
FROM (
|
FROM (
|
||||||
SELECT distinct name, sets FROM sets
|
SELECT distinct name FROM sets
|
||||||
WHERE name IN (${questions})
|
WHERE name IN (${questions})
|
||||||
) workouts
|
) workouts
|
||||||
LEFT JOIN sets ON sets.name = workouts.name
|
LEFT JOIN sets ON sets.name = workouts.name
|
||||||
|
|
Loading…
Reference in New Issue
Block a user