summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHubert Hirtz <hubert@hirtzfr.eu>2020-08-04 11:42:52 +0200
committerHubert Hirtz <hubert@hirtzfr.eu>2020-08-04 11:42:52 +0200
commit4790252cd1c5ff97ebc2b720653e38c3359d4a95 (patch)
treebed68fc12bcc272f35465b9bf0864a51fc0701c6
parentRework display (diff)
Show channels as bold on unread messages
Diffstat (limited to '')
-rw-r--r--ui/buffers.go8
1 files changed, 8 insertions, 0 deletions
diff --git a/ui/buffers.go b/ui/buffers.go
index a61766c..068894e 100644
--- a/ui/buffers.go
+++ b/ui/buffers.go
@@ -296,10 +296,14 @@ func (bs *bufferList) Resize(width, height int) {
func (bs *bufferList) Next() {
bs.current = (bs.current + 1) % len(bs.list)
+ bs.list[bs.current].highlights = 0
+ bs.list[bs.current].unread = false
}
func (bs *bufferList) Previous() {
bs.current = (bs.current - 1 + len(bs.list)) % len(bs.list)
+ bs.list[bs.current].highlights = 0
+ bs.list[bs.current].unread = false
}
func (bs *bufferList) Add(title string) (ok bool) {
@@ -351,6 +355,10 @@ func (bs *bufferList) AddLine(title string, line Line) {
b.scrollAmt++
}
}
+
+ if !line.isStatus && idx != bs.current {
+ b.unread = true
+ }
}
func (bs *bufferList) AddLines(title string, lines []Line) {