commit 4790252

Hubert Hirtz  ·  2020-08-04 09:42:52 +0000 UTC
parent 3c8dcea
Show channels as bold on unread messages
1 files changed,  +8, -0
+8, -0
 1@@ -296,10 +296,14 @@ func (bs *bufferList) Resize(width, height int) {
 2 
 3 func (bs *bufferList) Next() {
 4 	bs.current = (bs.current + 1) % len(bs.list)
 5+	bs.list[bs.current].highlights = 0
 6+	bs.list[bs.current].unread = false
 7 }
 8 
 9 func (bs *bufferList) Previous() {
10 	bs.current = (bs.current - 1 + len(bs.list)) % len(bs.list)
11+	bs.list[bs.current].highlights = 0
12+	bs.list[bs.current].unread = false
13 }
14 
15 func (bs *bufferList) Add(title string) (ok bool) {
16@@ -351,6 +355,10 @@ func (bs *bufferList) AddLine(title string, line Line) {
17 			b.scrollAmt++
18 		}
19 	}
20+
21+	if !line.isStatus && idx != bs.current {
22+		b.unread = true
23+	}
24 }
25 
26 func (bs *bufferList) AddLines(title string, lines []Line) {