perf: 优化StartUp速度,首页展开理智窗口时StartUp会关上 (#6730)

This commit is contained in:
MistEO
2023-10-08 15:16:12 +08:00
committed by GitHub
4 changed files with 44 additions and 1 deletions

View File

@@ -3311,6 +3311,48 @@
"StartUpThemes#next",
"StartUpConnectingFlag@LoadingIcon"
]
},
"StartAtHome": {
"baseTask": "Home",
"action": "DoNothing",
"template": [
"Terminal.png",
"TerminalDark.png",
"TerminalSami.png"
],
"next": [
"Home",
"StartUpBegin"
],
"postDelay_Doc": "等待以防万一StartUp还有双倍的任务延迟等待默认0.5s x2",
"postDelay": 1000
},
"StartWithSanity": {
"roi": [
700,
130,
140,
120
],
"maskRange": [
100,
255
],
"next": [
"CloseHomeSanity"
]
},
"CloseHomeSanity": {
"action": "ClickSelf",
"roi": [
750,
610,
140,
70
],
"next": [
"Home"
]
},
"StartUp": {
"template": [

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 14 KiB

View File

@@ -16,7 +16,8 @@ asst::StartUpTask::StartUpTask(const AsstCallback& callback, Assistant* inst)
{
LogTraceFunction;
m_start_up_task_ptr->set_tasks({ "StartUpBegin" })
// 前两项认为用户已手动启动至首页
m_start_up_task_ptr->set_tasks({ "StartAtHome", "StartWithSanity", "StartUpBegin" })
.set_times_limit("BlackReturn", 0)
.set_task_delay(Config.get_options().task_delay * 2)
.set_retry_times(30);