pomo icon indicating copy to clipboard operation
pomo copied to clipboard

Fix inaccurate notifications issue

Open stelcodes opened this issue 1 year ago • 2 comments

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

stelcodes avatar May 18 '23 03:05 stelcodes

Broke the tests somehow...

stelcodes avatar May 18 '23 15:05 stelcodes

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.

stelcodes avatar May 18 '23 16:05 stelcodes