perf: goroutinize session.ChannelMessageSend()
This commit is contained in:
parent
6e27a46404
commit
5656faf2e6
1 changed files with 3 additions and 3 deletions
|
|
@ -83,13 +83,13 @@ func onMessageInputFieldInputCapture(e *tcell.EventKey) *tcell.EventKey {
|
|||
switch e.Key() {
|
||||
case tcell.KeyEnter:
|
||||
if selectedChannel != nil {
|
||||
text := strings.TrimSpace(messageInputField.GetText())
|
||||
if text == "" {
|
||||
t := strings.TrimSpace(messageInputField.GetText())
|
||||
if t == "" {
|
||||
return nil
|
||||
}
|
||||
|
||||
session.ChannelMessageSend(selectedChannel.ID, text)
|
||||
messageInputField.SetText("")
|
||||
go session.ChannelMessageSend(selectedChannel.ID, t)
|
||||
}
|
||||
case tcell.KeyCtrlV:
|
||||
text, _ := clipboard.ReadAll()
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue