diff --git a/.idea/workspace.xml b/.idea/workspace.xml
index df4ef8fc..d1636c28 100644
--- a/.idea/workspace.xml
+++ b/.idea/workspace.xml
@@ -4,10 +4,9 @@
-
+
-
-
+
@@ -273,27 +272,6 @@
1672848140146
-
- 1684726034556
-
-
-
- 1684726034556
-
-
- 1684726338618
-
-
-
- 1684726338618
-
-
- 1692427491271
-
-
-
- 1692427491271
-
1698248435600
@@ -616,7 +594,28 @@
1700289701718
-
+
+ 1700290543397
+
+
+
+ 1700290543397
+
+
+ 1700290549743
+
+
+
+ 1700290549743
+
+
+ 1700290555508
+
+
+
+ 1700290555508
+
+
@@ -668,7 +667,6 @@
-
@@ -677,7 +675,8 @@
-
+
+
diff --git a/app/ui_pc/chat/chat_info.py b/app/ui_pc/chat/chat_info.py
index 67a82e85..66e40b8b 100644
--- a/app/ui_pc/chat/chat_info.py
+++ b/app/ui_pc/chat/chat_info.py
@@ -10,9 +10,9 @@ class ChatInfo(QWidget):
def __init__(self, contact, parent=None):
super().__init__(parent)
self.last_timestamp = 0
+ self.last_str_time = ''
self.last_pos = 0
self.contact = contact
-
self.init_ui()
self.show_chats()
@@ -71,6 +71,7 @@ def setScrollBarPos(self):
def is_5_min(self, timestamp):
if abs(timestamp - self.last_timestamp) > 300:
self.last_timestamp = timestamp
+
return True
return False
@@ -85,7 +86,8 @@ def add_message(self, message):
timestamp = message[5]
if type_ == 1:
if self.is_5_min(timestamp):
- time_message = Notice(str_time)
+ time_message = Notice(self.last_str_time)
+ self.last_str_time = str_time
self.chat_window.add_message_item(time_message, 0)
bubble_message = BubbleMessage(
str_content,
@@ -96,6 +98,7 @@ def add_message(self, message):
# print(str_content)
# self.scroolAreaLayout.addWidget(bubble_message)
self.chat_window.add_message_item(bubble_message, 0)
+
except:
print(message)