I think ement-after-initial-sync-hook is called per session, and creates a duplicate idle timer each time?
(defun ement--run-idle-timer (&rest _ignore)
"Run idle timer that updates read receipts.
To be called from `ement-after-initial-sync-hook'. Timer is
stored in `ement-read-receipt-idle-timer'."
(setf ement-read-receipt-idle-timer (run-with-idle-timer 3 t #'ement-room-read-receipt-idle-timer)))
It seems like it should simply test the variable to see whether it's already a timer?
I think
ement-after-initial-sync-hookis called per session, and creates a duplicate idle timer each time?It seems like it should simply test the variable to see whether it's already a timer?