# HG changeset patch # User Goffi # Date 1469375964 -7200 # Node ID 7199e6bdb94e2679a6b762a24bf1e86ee0e2272f # Parent 7aa58b7a47e225ea5cb983f38e991a64f7cafda8 quick_frontend, primitivus (chat): fixed widget bad locking + don't send notification when locked diff -r 7aa58b7a47e2 -r 7199e6bdb94e frontends/src/primitivus/chat.py --- a/frontends/src/primitivus/chat.py Sun Jul 24 17:56:18 2016 +0200 +++ b/frontends/src/primitivus/chat.py Sun Jul 24 17:59:24 2016 +0200 @@ -442,6 +442,11 @@ # notifications + if self._locked: + # we don't want notifications when locked + # because that's history messages + return + if wid.mess_data.mention: from_jid = wid.mess_data.from_jid msg = _(u'You have been mentioned by {nick} in {room}'.format( diff -r 7aa58b7a47e2 -r 7199e6bdb94e frontends/src/quick_frontend/quick_chat.py --- a/frontends/src/quick_frontend/quick_chat.py Sun Jul 24 17:56:18 2016 +0200 +++ b/frontends/src/quick_frontend/quick_chat.py Sun Jul 24 17:59:24 2016 +0200 @@ -153,7 +153,7 @@ """ self.lang = '' # default language to use for messages quick_widgets.QuickWidget.__init__(self, host, target, profiles=profiles) - self._locked = False # True when we are waiting for history/search + self._locked = True # True when we are waiting for history/search # messageNew signals are cached when locked self._cache = [] assert type_ in (C.CHAT_ONE2ONE, C.CHAT_GROUP)