diff --git a/pomm-third-time.el b/pomm-third-time.el index 1b3f53e..e8e4361 100644 --- a/pomm-third-time.el +++ b/pomm-third-time.el @@ -145,7 +145,9 @@ This is an alist with the following keys: (if (not (string-empty-p data)) (setq pomm-third-time--state (car (read-from-string data))) (pomm-third-time--do-reset))))) - (pomm-third-time--cleanup-old-history)) + (pomm-third-time--cleanup-old-history) + (when (eq (alist-get 'status pomm-third-time--state) 'running) + (setq pomm--timer (run-with-timer 0 1 #'pomm-third-time--on-tick)))) (defun pomm-third-time--save-state () "Save the current Third Time timer state." diff --git a/pomm.el b/pomm.el index 415d5b2..8e15542 100644 --- a/pomm.el +++ b/pomm.el @@ -272,7 +272,9 @@ start of the timer." (if (not (string-empty-p data)) (setq pomm--state (car (read-from-string data))) (pomm--do-reset))))) - (pomm--cleanup-old-history)) + (pomm--cleanup-old-history) + (when (eq (alist-get 'status pomm--state) 'running) + (setq pomm--timer (run-with-timer 0 1 #'pomm--on-tick)))) (defun pomm--save-state () "Save the current Pomodoro timer state."