From 99e6f2611f3a200f022bfa60b6a941bc08db285a Mon Sep 17 00:00:00 2001 From: Madhur Garg Date: Thu, 22 Aug 2019 06:23:30 +0530 Subject: Added 'top' attribute in the 'Message' object (The problem of the wrong order of messages was because of this.) --- poezio/text_buffer.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'poezio/text_buffer.py') diff --git a/poezio/text_buffer.py b/poezio/text_buffer.py index eeb83be4..526e4b69 100644 --- a/poezio/text_buffer.py +++ b/poezio/text_buffer.py @@ -19,7 +19,7 @@ from poezio.theming import get_theme, dump_tuple class Message: __slots__ = ('txt', 'nick_color', 'time', 'str_time', 'nickname', 'user', - 'identifier', 'highlight', 'me', 'old_message', 'revisions', + 'identifier', 'top', 'highlight', 'me', 'old_message', 'revisions', 'jid', 'ack') def __init__(self, @@ -30,6 +30,7 @@ class Message: history: bool, user: Optional[str], identifier: Optional[str], + top: Optional[bool] = False, str_time: Optional[str] = None, highlight: bool = False, old_message: Optional['Message'] = None, @@ -61,6 +62,7 @@ class Message: self.nickname = nickname self.user = user self.identifier = identifier + self.top = top self.highlight = highlight self.me = me self.old_message = old_message @@ -155,6 +157,7 @@ class TextBuffer: history, user, identifier, + top, str_time=str_time, highlight=highlight, jid=jid, -- cgit v1.2.3