send StatEvent on MessageEvent outgoing handler
avoids duplicate "not connected to any server" messages when attempting to send messages while disconnected (because of the outgoing event loop handling that message)
This commit is contained in:
parent
b091174e5a
commit
5701062c7f
2 changed files with 1 additions and 1 deletions
|
|
@ -95,7 +95,6 @@ func (app *App) submitTextInput() {
|
|||
}
|
||||
} else {
|
||||
app.outgoing <- MessageEvent(fmt.Sprintf("%s: %s", app.nick, app.input.String()))
|
||||
app.outgoing <- StatEvent("")
|
||||
}
|
||||
|
||||
app.input.SetContent("")
|
||||
|
|
|
|||
1
event.go
1
event.go
|
|
@ -124,6 +124,7 @@ func (ev MessageEvent) HandleOutgoing(app *App) error {
|
|||
return err
|
||||
}
|
||||
app.incoming <- SetLastEvent(num)
|
||||
app.outgoing <- StatEvent("")
|
||||
|
||||
return nil
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue