Skip to content

Commit c8cebfa

Browse files
committed
Cleanup
1 parent 4a15935 commit c8cebfa

File tree

1 file changed

+3
-10
lines changed

1 file changed

+3
-10
lines changed

src/functions/pomodoro.ts

Lines changed: 3 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -32,22 +32,15 @@ export async function checkPomodoro() {
3232
isPomodoroTargetPeriodEnd = addSeconds(startTime, plusWorkingTime + plusRestTime + workTime);
3333
const isTargetPeriod =
3434
now >= isPomodoroTargetPeriodStart &&
35-
(now <= isPomodoroTargetPeriodEnd || addSeconds(now, -1) <= isPomodoroTargetPeriodEnd);
35+
(addSeconds(now, -1) <= isPomodoroTargetPeriodEnd || now <= isPomodoroTargetPeriodEnd);
3636

3737
if (isTargetPeriod) {
38-
console.log(
39-
now,
40-
isPomodoroTargetPeriodEnd,
41-
isDateEqual(now, isPomodoroTargetPeriodEnd) ||
42-
isDateEqual(addSeconds(now, -1), isPomodoroTargetPeriodEnd),
43-
period,
44-
);
4538
return {
4639
period: period,
4740
isTargetPeriod: isTargetPeriod,
4841
isTargetPeriodFinishedNow:
49-
isDateEqual(now, isPomodoroTargetPeriodEnd) ||
50-
isDateEqual(addSeconds(now, -1), isPomodoroTargetPeriodEnd),
42+
isDateEqual(addSeconds(now, -1), isPomodoroTargetPeriodEnd) ||
43+
isDateEqual(now, isPomodoroTargetPeriodEnd),
5144
};
5245
}
5346
}

0 commit comments

Comments
 (0)