From 53c74b3033bf7b07e9e175d9b6ab0416b8bd1ff9 Mon Sep 17 00:00:00 2001 From: DancingSnow <1121149616@qq.com> Date: Fri, 12 May 2023 15:49:18 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E6=9B=B4=E6=96=B0=E6=95=B0?= =?UTF-8?q?=E6=8D=AE=E4=B8=8D=E6=9B=B4=E6=96=B0uid=20box=E7=9A=84=E9=97=AE?= =?UTF-8?q?=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/star_rail_gacha/app/pages/home_page.py | 6 ++++-- src/star_rail_gacha/app/pages/settings_page.py | 1 + 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/src/star_rail_gacha/app/pages/home_page.py b/src/star_rail_gacha/app/pages/home_page.py index 83e37ca..788fec4 100644 --- a/src/star_rail_gacha/app/pages/home_page.py +++ b/src/star_rail_gacha/app/pages/home_page.py @@ -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) @@ -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 @@ -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): @@ -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() diff --git a/src/star_rail_gacha/app/pages/settings_page.py b/src/star_rail_gacha/app/pages/settings_page.py index 3efbe90..8ba42e1 100644 --- a/src/star_rail_gacha/app/pages/settings_page.py +++ b/src/star_rail_gacha/app/pages/settings_page.py @@ -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,