feat: 实现 Client 在线更新与安全回退 (#93)
This commit is contained in:
@@ -32,6 +32,7 @@ from .pdd_ui_event import PDDTaskPageEvent
|
||||
from .pdd_u2_purchase_adapter import create_u2_purchase_adapter
|
||||
from .settings_ui import SettingsPage
|
||||
from .task_repository import TaskRepository
|
||||
from .update_service import mark_current_version_healthy
|
||||
|
||||
|
||||
class MainWindow(FluentWindow):
|
||||
@@ -96,6 +97,11 @@ def ui_main():
|
||||
|
||||
window = MainWindow()
|
||||
window.show()
|
||||
try:
|
||||
mark_current_version_healthy()
|
||||
except OSError:
|
||||
# 健康标记失败不能让界面崩溃;Launcher 会保留旧版本并在下次启动恢复。
|
||||
pass
|
||||
return app.exec_()
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user