From bf84fc09b216bd4669d9a0ed9bba30209f0cb7a8 Mon Sep 17 00:00:00 2001 From: Digital Date: Sat, 30 Jun 2018 22:26:40 +0200 Subject: Add option to disable typing notifications (#63) --- ui/view-main.go | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) (limited to 'ui/view-main.go') 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) + } } } -- cgit v1.2.3