From a13e1a3ec0c15936c6570d34f604aec1fe391385 Mon Sep 17 00:00:00 2001 From: MrKBear Date: Thu, 2 Jun 2022 10:57:11 +0800 Subject: [PATCH] Optmize file load func --- package.json | 2 +- source/Context/Status.tsx | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/package.json b/package.json index c919826..1e6bca1 100644 --- a/package.json +++ b/package.json @@ -34,7 +34,7 @@ "copy-package-json": "fse mkdirp ./bundle/ & node ./config/electron.forge.config.js --out ./bundle", "copy-build-result": "fse mkdirp ./bundle/ & fse mkdirp ./build/ & fse copy ./build/ ./bundle/", "copy-electron-icon": "fse mkdirp ./bundle/ & fse copy ./assets/living-together.ico ./bundle/living-together.ico & fse copy ./assets/living-together.icns ./bundle/living-together.icns", - "electron-app-ci": "cd ./bundle & npm install & cd ../", + "electron-app-ci": "cd ./bundle & set ELECTRON_SKIP_BINARY_DOWNLOAD=1& npm i & set ELECTRON_SKIP_BINARY_DOWNLOAD=& set ELECTRON_MIRROR=https://npmmirror.com/mirrors/electron/& set ELECTRON_CUSTOM_DIR={{ version }}& node ./node_modules/electron/install.js & cd ../", "gen-bundle": "fse emptyDir ./bundle/ & npm run copy-package-json & npm run copy-electron-icon & npm run electron-app-ci" }, "keywords": [ diff --git a/source/Context/Status.tsx b/source/Context/Status.tsx index 74520e3..e412258 100644 --- a/source/Context/Status.tsx +++ b/source/Context/Status.tsx @@ -183,6 +183,8 @@ class Status extends Emitter { this.setFocusObject(new Set()); this.setLabelObject(); this.setClipObject(); + this.actuator.endPlay(); + this.actuator.start(false); // 映射 this.emit("fileLoad");