summaryrefslogtreecommitdiff
path: root/client
diff options
context:
space:
mode:
Diffstat (limited to 'client')
-rw-r--r--client/channel_window.go19
1 files changed, 14 insertions, 5 deletions
diff --git a/client/channel_window.go b/client/channel_window.go
index f9ed5a8..d003ce8 100644
--- a/client/channel_window.go
+++ b/client/channel_window.go
@@ -59,6 +59,12 @@ func (cw *channelWindow) username(uid string) string {
return "..."
}
+func (cw *channelWindow) isGone(uid string) bool {
+ cw.watchUser(uid)
+ u := globalApp.cache.Get(uid)
+ return u != nil && u.Kind == "gone"
+}
+
func (cw *channelWindow) put(msg proto.Object) {
cw.buf.Add(channelMsg {msg, cw})
}
@@ -273,17 +279,20 @@ func (m channelMsg) Show(odd bool) {
tui.Pop()
tui.Pop()
case "m":
- var usernameFg int32 = tui.White
+ nameStyle := tui.Style {Bg: bg, Fg: tui.White}
if m.Fields["f"] == globalApp.uid {
- usernameFg = tui.Cyan
+ nameStyle.Fg = tui.Cyan
+ }
+ if m.window.isGone(m.Fields["f"]) {
+ nameStyle.Italic = true
+ } else {
+ nameStyle.Bold = true
}
tui.Push("", tui.Box {Width: tui.Fill, Height: 1, Dir: tui.Left})
m.showDate(bg)
tui.Push("", tui.Box {Width: tui.TextSize, Height: 1, NoWrap: true})
- tui.Text(m.window.username(m.Fields["f"]), &tui.Style {
- Fg: usernameFg, Bg: bg, Bold: true,
- })
+ tui.Text(m.window.username(m.Fields["f"]), &nameStyle)
tui.Pop()
tui.Pop()