summaryrefslogtreecommitdiff
path: root/app.go
diff options
context:
space:
mode:
authordelthas <delthas@dille.cc>2021-11-24 16:01:59 +0100
committerHubert Hirtz <hubert@hirtz.pm>2021-11-24 16:08:07 +0100
commitd41d7c5d975a4b9d80779065c4a4d9e09b35ae91 (patch)
treeef0a7ba5ca1ba5270d8a28c002c2fe1d13cf920a /app.go
parentOnly use first line of `password-cmd` output (diff)
Show the current channel topic at the top of the timeline
Diffstat (limited to 'app.go')
-rw-r--r--app.go4
1 files changed, 3 insertions, 1 deletions
diff --git a/app.go b/app.go
index 6ea9f44..7b416c8 100644
--- a/app.go
+++ b/app.go
@@ -674,7 +674,8 @@ func (app *App) handleIRCEvent(netID string, ev interface{}) {
app.win.JumpBufferIndex(i)
}
if ev.Topic != "" {
- app.printTopic(netID, ev.Channel)
+ topic := ui.IRCString(ev.Topic).String()
+ app.win.SetTopic(netID, ev.Channel, topic)
}
// Restore last buffer
@@ -733,6 +734,7 @@ func (app *App) handleIRCEvent(netID string, ev interface{}) {
case irc.TopicChangeEvent:
topic := ui.IRCString(ev.Topic).String()
body := fmt.Sprintf("Topic changed to: %s", topic)
+ app.win.SetTopic(netID, ev.Channel, topic)
app.win.AddLine(netID, ev.Channel, ui.NotifyUnread, ui.Line{
At: msg.TimeOrNow(),
Head: "--",