diff --git a/src/chat.py b/src/chat.py index 83fe90439..f35cd83e7 100644 --- a/src/chat.py +++ b/src/chat.py @@ -826,7 +826,7 @@ class Chat: def print_conversation_line(self, text, jid, kind, name, tim, other_tags_for_name = [], other_tags_for_time = [], - other_tags_for_text = []): + other_tags_for_text = [], count_as_new = True): textview = self.xmls[jid].get_widget('conversation_textview') buffer = textview.get_buffer() buffer.begin_user_action() @@ -869,9 +869,6 @@ class Chat: text = '* ' + name + text[3:] text_tags.append(kind) - if kind == 'incoming': - self.last_message_time[jid] = time.time() - if name and len(text_tags) == len(other_tags_for_text): # not status nor /me name_tags = other_tags_for_name[:] #create a new list @@ -898,6 +895,12 @@ class Chat: buffer.end_user_action() + if not count_as_new: + return + + if kind == 'incoming': + self.last_message_time[jid] = time.time() + if (jid != self.get_active_jid() or \ not self.window.is_active() or \ not end) and kind == 'incoming': diff --git a/src/tabbed_chat_window.py b/src/tabbed_chat_window.py index 84a9eb412..e991e196f 100644 --- a/src/tabbed_chat_window.py +++ b/src/tabbed_chat_window.py @@ -453,7 +453,7 @@ class TabbedChatWindow(chat.Chat): text = ':'.join(msg[2:])[0:-1] #remove the latest \n self.print_conversation_line(text, jid, kind, name, tim, - ['small'], ['small', 'grey'], ['small', 'grey']) + ['small'], ['small', 'grey'], ['small', 'grey'], False) if len(lines): self.print_empty_line(jid)