Fix rest timers for new sets from homepage
This commit is contained in:
parent
0e5de0e519
commit
29d14d74ff
|
@ -30,8 +30,9 @@ export default function EditSet() {
|
||||||
const startTimer = useCallback(
|
const startTimer = useCallback(
|
||||||
async (name: string) => {
|
async (name: string) => {
|
||||||
if (!settings.alarm) return
|
if (!settings.alarm) return
|
||||||
const {minutes, seconds} = await setRepo.findOne({where: {name}})
|
const first = await setRepo.findOne({where: {name}})
|
||||||
const milliseconds = (minutes ?? 3) * 60 * 1000 + (seconds ?? 0) * 1000
|
const milliseconds =
|
||||||
|
(first?.minutes ?? 3) * 60 * 1000 + (first?.seconds ?? 0) * 1000
|
||||||
NativeModules.AlarmModule.timer(
|
NativeModules.AlarmModule.timer(
|
||||||
milliseconds,
|
milliseconds,
|
||||||
settings.vibrate,
|
settings.vibrate,
|
||||||
|
|
Loading…
Reference in New Issue
Block a user