---
This also prevents marking the buffer as read when the window/tab isn't
focused. When the focus gets restored, it gets marked.
I also added the server name in the title, since it fits there anyway.
I also thought about that, but came to the conclusion that one would be
useless without the other. It's possible, though. I'll send another revision
soon, should I split the changes?
I wonder if we want to display the total number of unread buffers, or only the
number of unread highlights. The former sounds a bit spammy: high-traffic
channels have new messages every few seconds...
Style nit: braces are mandatory
Here we're updating the title when receiving a new message, but there are other
situations where the number of unread messages changes. It's possible to grep
for "unread" buffer state changes to list these. For instance, when receiving
a MARKREAD message (another client has marked a message as read).
This sounds like duplicated code with switchBuffer(). Maybe we can consolidate
the common bits into a single function?
(Also this doesn't dismiss notifications.)
Shouldn't this be "focus" instead of "blur"? Also this won't work if bind() is
called here: each call to bind() will return a new function. We need to bind()
when constructing the component.
gamja/patches/.build.yml: SUCCESS in 39s
[Show number of unread buffers in document title][0] from [sitting33][1]
[0]: https://lists.sr.ht/~emersion/public-inbox/patches/42074
[1]: mailto:me@sit.sh
✓ #1011825 SUCCESS gamja/patches/.build.yml https://builds.sr.ht/~emersion/job/1011825