You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I've just written the following, which I think could be adapted to standard behaviour.
What do you think of the idea of just not updating unless/until the buffer is visible?
(define-advice ement-room-list-auto-update (:around (orig-fun &rest args) my-ignore-hidden)
"Do nothing at all if *Ement Room List* is not currently displayed.This is :around advice for `ement-room-list-auto-update'. Remove with:\(advice-remove \\='ement-room-list-auto-update\\='ement-room-list-auto-update@my-ignore-hidden)"
(when-let ((buf (get-buffer"*Ement Room List*")))
(if (get-buffer-window buf 'visible)
(apply orig-fun args)
;; The next time that a window-configuration change results in the buffer;; being displayed in a window, call the specified function (with the;; window selected and the buffer set as current). Because the function;; removes itself from the buffer-local hook value, it only triggers once.
(with-current-buffer buf
(add-hook'window-configuration-change-hook#'my-ement-room-list-auto-update-nownil:local)))))
(defunmy-ement-room-list-auto-update-now ()
"Called via `window-configuration-change-hook'.See `ement-room-list-auto-update@my-ignore-hidden'."
(remove-hook'window-configuration-change-hook#'my-ement-room-list-auto-update-now:local)
(ement-room-list-auto-update nil))
The text was updated successfully, but these errors were encountered:
Well, obviously I would prefer to avoid hacks like this if possible. AFAIK the intention is still to debounce the room-list updating, i.e. #197. Do we (or do some users) need both? Or is this an alternative to that?
I've just written the following, which I think could be adapted to standard behaviour.
What do you think of the idea of just not updating unless/until the buffer is visible?
The text was updated successfully, but these errors were encountered: