diff options
author | Digital <digidev@digitalville.de> | 2018-06-30 22:26:40 +0200 |
---|---|---|
committer | Tulir Asokan <tulir@maunium.net> | 2018-06-30 23:26:40 +0300 |
commit | bf84fc09b216bd4669d9a0ed9bba30209f0cb7a8 (patch) | |
tree | 12712d67ad64e9632e3321a3ab9f30f12dffb9ca /ui/view-main.go | |
parent | c3f30a160f68cd120b99adc6505f1ff073407c55 (diff) |
Add option to disable typing notifications (#63)
Diffstat (limited to 'ui/view-main.go')
-rw-r--r-- | ui/view-main.go | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/ui/view-main.go b/ui/view-main.go index fe2db76..40a6dcd 100644 --- a/ui/view-main.go +++ b/ui/view-main.go @@ -102,10 +102,12 @@ func (view *MainView) MarkRead(roomView *RoomView) { } func (view *MainView) InputChanged(roomView *RoomView, text string) { - if len(text) == 0 { - go view.matrix.SendTyping(roomView.Room.ID, false) - } else if text[0] != '/' { - go view.matrix.SendTyping(roomView.Room.ID, true) + 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) + } } } |