pomo
pomo copied to clipboard
Fix inaccurate notifications issue
The pomo notify
command uses the the pomo_msg
bash function which sleeps until the current cycle portion should end. Upon waking up, it checks pomo_stat
for the current pomodoro state. In order to get an accurate state, pomo_update
needs to be called first because the pomodoro timer may have been restarted while pomo_msg
was sleeping.
Fixes #14
Broke the tests somehow...
Looking at the tests and realizing that adding this pomo_update
to pomo_msg
seems to break some intended functionality like sending a delayed "best effort" notification shown in tests:
@test "pomo_msg handles timestamp update before it can send the end of break message 1"
@test "pomo_msg handles timestamp update before it can send the end of break message 2"
So I removed these tests in the PR.