summaryrefslogtreecommitdiff
path: root/app.go
diff options
context:
space:
mode:
authorHubert Hirtz <hubert@hirtzfr.eu>2020-08-16 16:04:19 +0200
committerHubert Hirtz <hubert@hirtzfr.eu>2020-08-16 16:04:19 +0200
commit1b15bf87e804692ca07bb5b7766d1fb80b024769 (patch)
tree3386cada20a2cd6ac81bd420ee29bac521d6474c /app.go
parentirc: Simplify debug logging of incoming messages (diff)
irc: Use typing constants
Diffstat (limited to 'app.go')
-rw-r--r--app.go12
1 files changed, 6 insertions, 6 deletions
diff --git a/app.go b/app.go
index 47c6505..fb7faf6 100644
--- a/app.go
+++ b/app.go
@@ -135,16 +135,16 @@ func (app *App) handleIRCEvent(ev irc.Event) {
app.win.AddLine(ev.Channel, l, isHighlight)
app.win.TypingStop(ev.Channel, ev.Nick)
- case irc.QueryTypingEvent:
- if ev.State == 1 || ev.State == 2 {
+ case irc.QueryTagEvent:
+ if ev.Typing == irc.TypingActive || ev.Typing == irc.TypingPaused {
app.win.TypingStart(ui.Home, ev.Nick)
- } else {
+ } else if ev.Typing == irc.TypingDone {
app.win.TypingStop(ui.Home, ev.Nick)
}
- case irc.ChannelTypingEvent:
- if ev.State == 1 || ev.State == 2 {
+ case irc.ChannelTagEvent:
+ if ev.Typing == irc.TypingActive || ev.Typing == irc.TypingPaused {
app.win.TypingStart(ev.Channel, ev.Nick)
- } else {
+ } else if ev.Typing == irc.TypingDone {
app.win.TypingStop(ev.Channel, ev.Nick)
}
case irc.HistoryEvent: