Daniel Brötzmann pushed to branch master at gajim / gajim
Commits:
-
6dc81a62
by wurstsalat at 2021-12-11T22:51:46+01:00
1 changed file:
Changes:
| ... | ... | @@ -13,6 +13,7 @@ |
| 13 | 13 |
# along with Gajim. If not, see <http://www.gnu.org/licenses/>.
|
| 14 | 14 |
|
| 15 | 15 |
from datetime import datetime
|
| 16 |
+from datetime import timedelta
|
|
| 16 | 17 |
|
| 17 | 18 |
from gi.repository import Gtk
|
| 18 | 19 |
|
| ... | ... | @@ -46,7 +47,7 @@ def _on_nickname_update(self, contact, _signal_name): |
| 46 | 47 |
self.label.set_text(text)
|
| 47 | 48 |
|
| 48 | 49 |
def set_timestamp(self, timestamp: datetime) -> None:
|
| 49 |
- if timestamp < self._last_incoming_timestamp:
|
|
| 50 |
+ if timestamp <= self._last_incoming_timestamp:
|
|
| 50 | 51 |
return
|
| 51 | 52 |
|
| 52 | 53 |
self.timestamp = timestamp
|
| ... | ... | @@ -57,4 +58,5 @@ def set_timestamp(self, timestamp: datetime) -> None: |
| 57 | 58 |
|
| 58 | 59 |
def set_last_incoming_timestamp(self, timestamp: datetime) -> None:
|
| 59 | 60 |
if timestamp > self._last_incoming_timestamp:
|
| 60 |
- self._last_incoming_timestamp = timestamp
|
|
| 61 |
+ self._last_incoming_timestamp = timestamp + timedelta(
|
|
| 62 |
+ microseconds=1)
|