# HG changeset patch # User Goffi # Date 1525934084 -7200 # Node ID 5e54afd17321123e423363188d85ae153863882d # Parent 787b15d16347941c2c5697522897f455bd02732c quick frontend (chat): added a property to Message which is True when message comes from history diff -r 787b15d16347 -r 5e54afd17321 sat_frontends/quick_frontend/quick_chat.py --- a/sat_frontends/quick_frontend/quick_chat.py Fri Apr 13 18:45:43 2018 +0200 +++ b/sat_frontends/quick_frontend/quick_chat.py Thu May 10 08:34:44 2018 +0200 @@ -90,6 +90,11 @@ return False @property + def history(self): + """True if message come from history""" + return self.extra.get('history', False) + + @property def main_message(self): """currently displayed message""" if self.parent.lang in self.message: @@ -471,6 +476,7 @@ # if ((self.type == C.CHAT_GROUP and type_ != C.MESS_TYPE_GROUPCHAT) or # (self.type == C.CHAT_ONE2ONE and type_ == C.MESS_TYPE_GROUPCHAT)): # continue + extra['history'] = True self.messages[uid] = Message(self, uid, timestamp, from_jid, to_jid, message, subject, type_, extra, profile) self._onHistoryPrinted()