Skip to content

Duplicate idle timers (ement-read-receipt-idle-timer) #196

@phil-s

Description

@phil-s

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?

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions