diff options
author | Hubert Hirtz <hubert@hirtzfr.eu> | 2020-08-16 16:04:19 +0200 |
---|---|---|
committer | Hubert Hirtz <hubert@hirtzfr.eu> | 2020-08-16 16:04:19 +0200 |
commit | 1b15bf87e804692ca07bb5b7766d1fb80b024769 (patch) | |
tree | 3386cada20a2cd6ac81bd420ee29bac521d6474c /app.go | |
parent | irc: Simplify debug logging of incoming messages (diff) |
irc: Use typing constants
Diffstat (limited to 'app.go')
-rw-r--r-- | app.go | 12 |
1 files changed, 6 insertions, 6 deletions
@@ -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: |