Philipp Hörist pushed to branch mainwindow at gajim / gajim
Commits:
-
72d0d568
by lovetox at 2021-02-06T13:49:57+01:00
1 changed file:
Changes:
| ... | ... | @@ -149,9 +149,20 @@ def _on_message_received(self, event): |
| 149 | 149 |
return
|
| 150 | 150 |
|
| 151 | 151 |
row = self._chats.get((event.account, event.jid))
|
| 152 |
- row.add_unread()
|
|
| 153 | 152 |
row.set_last_message_text('Me', event.msgtxt)
|
| 154 | 153 |
|
| 154 |
+ self._add_unread(row, event.properties)
|
|
| 155 |
+ |
|
| 156 |
+ @staticmethod
|
|
| 157 |
+ def _add_unread(row, properties):
|
|
| 158 |
+ if properties.is_carbon_message and properties.carbon.is_sent:
|
|
| 159 |
+ return
|
|
| 160 |
+ |
|
| 161 |
+ if properties.is_from_us():
|
|
| 162 |
+ return
|
|
| 163 |
+ |
|
| 164 |
+ row.add_unread()
|
|
| 165 |
+ |
|
| 155 | 166 |
|
| 156 | 167 |
class ChatRow(Gtk.ListBoxRow):
|
| 157 | 168 |
def __init__(self, workspace_id, account, jid, type_):
|