mirror of
https://github.com/LC044/WeChatMsg
synced 2025-02-23 03:22:17 +08:00
修复启动加载慢的问题#59
This commit is contained in:
parent
d7604bf87d
commit
6b1c866e44
@ -39,7 +39,7 @@ class ChatInfo(QWidget):
|
|||||||
self.show_chat_thread = ShowChatThread(self.contact)
|
self.show_chat_thread = ShowChatThread(self.contact)
|
||||||
self.show_chat_thread.showSingal.connect(self.add_message)
|
self.show_chat_thread.showSingal.connect(self.add_message)
|
||||||
self.show_chat_thread.finishSingal.connect(self.show_finish)
|
self.show_chat_thread.finishSingal.connect(self.show_finish)
|
||||||
self.show_chat_thread.start()
|
# self.show_chat_thread.start()
|
||||||
|
|
||||||
def show_finish(self, ok):
|
def show_finish(self, ok):
|
||||||
self.setScrollBarPos()
|
self.setScrollBarPos()
|
||||||
|
@ -58,6 +58,7 @@ class ChatWindow(QWidget, Ui_Form):
|
|||||||
self.contacts = [[], []]
|
self.contacts = [[], []]
|
||||||
self.init_ui()
|
self.init_ui()
|
||||||
self.show_chats()
|
self.show_chats()
|
||||||
|
self.visited = set()
|
||||||
|
|
||||||
def init_ui(self):
|
def init_ui(self):
|
||||||
search_action = QAction(self.lineEdit)
|
search_action = QAction(self.lineEdit)
|
||||||
@ -112,6 +113,10 @@ class ChatWindow(QWidget, Ui_Form):
|
|||||||
def setCurrentIndex(self, row):
|
def setCurrentIndex(self, row):
|
||||||
# print(row)
|
# print(row)
|
||||||
self.stackedWidget.setCurrentIndex(row)
|
self.stackedWidget.setCurrentIndex(row)
|
||||||
|
if row not in self.visited:
|
||||||
|
chat_info_window = self.stackedWidget.currentWidget()
|
||||||
|
chat_info_window.update_history_messages()
|
||||||
|
self.visited.add(row)
|
||||||
|
|
||||||
def stop_loading(self, a0):
|
def stop_loading(self, a0):
|
||||||
# self.label.setVisible(False)
|
# self.label.setVisible(False)
|
||||||
|
Loading…
Reference in New Issue
Block a user