From 29bb633914b8f949aab5e9bf3ec52d13609e5e1e Mon Sep 17 00:00:00 2001 From: Goffi Date: Sun, 7 Apr 2019 21:09:51 +0200 Subject: [PATCH] primitivus: don't call chatStateComposing when host is out of sync: if host is out of sync, that means that server is not connected and it makes no sense to call this method. Furthermore, this was resulting in a crash because profile is not found. --- sat_frontends/primitivus/primitivus | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/sat_frontends/primitivus/primitivus b/sat_frontends/primitivus/primitivus index 6f9ca995..3f43808d 100755 --- a/sat_frontends/primitivus/primitivus +++ b/sat_frontends/primitivus/primitivus @@ -180,7 +180,8 @@ class EditBar(sat_widgets.ModalEdit): if (self._mode == C.MODE_INSERTION and isinstance(self.host.selected_widget, quick_chat.QuickChat) and key not in sat_widgets.FOCUS_KEYS - and key not in (a_key['HISTORY_PREV'], a_key['HISTORY_NEXT'])): + and key not in (a_key['HISTORY_PREV'], a_key['HISTORY_NEXT']) + and self.host.sync): self.host.bridge.chatStateComposing(self.host.selected_widget.target, self.host.selected_widget.profile) return super(EditBar, self).keypress(size, key)