diff options
author | Tulir Asokan <tulir@maunium.net> | 2020-03-03 21:15:25 +0200 |
---|---|---|
committer | Tulir Asokan <tulir@maunium.net> | 2020-03-03 21:15:25 +0200 |
commit | fbe387f91226cdb9e214b2bc85cb73742da028b0 (patch) | |
tree | 56ed6c75c4ff211037c8df0979cf90c4a69b74b0 /ui | |
parent | 27ecb48e2311ad46c266f36c1646c19832c4c7f4 (diff) |
Don't send typing stop event if not necessary
Diffstat (limited to 'ui')
-rw-r--r-- | ui/view-main.go | 6 |
1 files changed, 1 insertions, 5 deletions
diff --git a/ui/view-main.go b/ui/view-main.go index 172e29f..c0c2424 100644 --- a/ui/view-main.go +++ b/ui/view-main.go @@ -134,11 +134,7 @@ func (view *MainView) MarkRead(roomView *RoomView) { func (view *MainView) InputChanged(roomView *RoomView, text string) { if !roomView.config.Preferences.DisableTypingNotifs { - if len(text) == 0 { - go view.matrix.SendTyping(roomView.Room.ID, false) - } else if text[0] != '/' { - go view.matrix.SendTyping(roomView.Room.ID, true) - } + view.matrix.SendTyping(roomView.Room.ID, len(text) > 0 && text[0] != '/') } } |