Skip to content

Commit

Permalink
修复更新数据不更新uid box的问题
Browse files Browse the repository at this point in the history
  • Loading branch information
DancingSnow0517 committed May 12, 2023
1 parent 3420831 commit 53c74b3
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/star_rail_gacha/app/pages/home_page.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ class UpdateThread(QThread):
statusLabelSignal = pyqtSignal(str)
stateTooltipSignal = pyqtSignal(str, str, bool)
updateButtonSignal = pyqtSignal(bool)
updateUidBoxSignal = pyqtSignal()

def __init__(self, parent: 'HomePage' = ...) -> None:
super().__init__(parent)
Expand Down Expand Up @@ -78,7 +79,7 @@ def run(self) -> None:
gacha_list = [Gacha(**o) for o in response['data']['list']]
should_next, add_count = gm.add_records(gacha_list)
count += add_count
if not should_next or config.get_full_data:
if not should_next and not config.get_full_data:
self.usleep(300)
break
end_id = gacha_list[-1].id
Expand All @@ -88,6 +89,7 @@ def run(self) -> None:
self.statusLabelSignal.emit(f"数据更新成功, 共更新了 {count} 条数据")
self.updateButtonSignal.emit(True)
self.stateTooltipSignal.emit("数据更新完成!", "", False)
self.updateUidBoxSignal.emit()


class HomePage(QFrame):
Expand Down Expand Up @@ -310,8 +312,8 @@ def update_data(self):
update_thread.statusLabelSignal.connect(self.__update_data_statusLabel_signalReceive)
update_thread.stateTooltipSignal.connect(self.__update_data_stateTooltip_signalReceive)
update_thread.updateButtonSignal.connect(self.__update_data_updateButton_signalReceive)
update_thread.updateUidBoxSignal.connect(self.update_uid_box)
update_thread.start()
self.update_uid_box()

def update_chart(self):
reset_index()
Expand Down
1 change: 1 addition & 0 deletions src/star_rail_gacha/app/pages/settings_page.py
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,7 @@ def __init__(self, parent=None) -> None:
"开启后,软件会使用代理地址来下载新版本。",
parent=self.updateGroup
)
self.useProxyCard.switchButton.setChecked(config.use_proxy)
self.ghProxyCard = LineEditSettingCard(
config.gh_proxy,
FluentIcon.GLOBE,
Expand Down

0 comments on commit 53c74b3

Please sign in to comment.