Perf(custom): speed up software start up

ISSUES CLOSED: #489
This commit is contained in:
Kuingsmile
2026-04-29 17:26:04 +08:00
parent 39eda83a00
commit e99e68e6ce
2 changed files with 7 additions and 2 deletions

View File

@@ -55,6 +55,7 @@ class RemoteNoticeHandler {
method: 'get',
url: REMOTE_NOTICE_URL,
responseType: 'json',
timeout: 5000,
}).then(res => res.data)) as IRemoteNotice
return noticeInfo
} catch {

View File

@@ -169,8 +169,12 @@ class LifeCycle {
notice.show()
}
}
await remoteNoticeHandler.init()
remoteNoticeHandler.triggerHook(IRemoteNoticeTriggerHook.APP_START)
remoteNoticeHandler
.init()
.then(() => {
remoteNoticeHandler.triggerHook(IRemoteNoticeTriggerHook.APP_START)
})
.catch(() => {})
if (startMode === ISartMode.MINI && process.platform !== 'darwin') {
windowManager.create(IWindowList.MINI_WINDOW)
const miniWindow = windowManager.get(IWindowList.MINI_WINDOW)