mirror of
https://github.com/LC044/WeChatMsg
synced 2025-02-22 19:02: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.showSingal.connect(self.add_message)
|
||||
self.show_chat_thread.finishSingal.connect(self.show_finish)
|
||||
self.show_chat_thread.start()
|
||||
# self.show_chat_thread.start()
|
||||
|
||||
def show_finish(self, ok):
|
||||
self.setScrollBarPos()
|
||||
|
@ -58,6 +58,7 @@ class ChatWindow(QWidget, Ui_Form):
|
||||
self.contacts = [[], []]
|
||||
self.init_ui()
|
||||
self.show_chats()
|
||||
self.visited = set()
|
||||
|
||||
def init_ui(self):
|
||||
search_action = QAction(self.lineEdit)
|
||||
@ -112,6 +113,10 @@ class ChatWindow(QWidget, Ui_Form):
|
||||
def setCurrentIndex(self, row):
|
||||
# print(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):
|
||||
# self.label.setVisible(False)
|
||||
|
Loading…
Reference in New Issue
Block a user