From 1c54dd3bc7c814a11292238fa84210c30ac4335b Mon Sep 17 00:00:00 2001 From: Hiroshiba Date: Mon, 23 Dec 2024 01:46:32 +0900 Subject: [PATCH] =?UTF-8?q?LOAD=5FPROJECT=5FFILE=E3=81=AEconfirm=E3=81=8C?= =?UTF-8?q?=E3=81=9A=E3=81=A3=E3=81=A8=E4=BD=BF=E3=82=8F=E3=82=8C=E3=81=A6?= =?UTF-8?q?=E3=81=AA=E3=81=84=E3=81=AE=E3=81=A7=E6=B6=88=E3=81=99?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/backend/electron/main.ts | 1 - src/plugins/ipcMessageReceiverPlugin.ts | 4 ++-- src/store/project.ts | 4 ++-- src/store/type.ts | 2 +- src/type/ipc.ts | 2 +- 5 files changed, 6 insertions(+), 7 deletions(-) diff --git a/src/backend/electron/main.ts b/src/backend/electron/main.ts index c8da2eac37..2a810609b8 100644 --- a/src/backend/electron/main.ts +++ b/src/backend/electron/main.ts @@ -1032,7 +1032,6 @@ app.on("second-instance", async (_event, _argv, _workDir, rawData) => { log.info("Second instance launched with vvproj file"); ipcMainSendProxy.LOAD_PROJECT_FILE(win, { filePath: data.filePath, - confirm: true, }); } if (win) { diff --git a/src/plugins/ipcMessageReceiverPlugin.ts b/src/plugins/ipcMessageReceiverPlugin.ts index 41d7df00f8..1ae8393ca6 100644 --- a/src/plugins/ipcMessageReceiverPlugin.ts +++ b/src/plugins/ipcMessageReceiverPlugin.ts @@ -9,8 +9,8 @@ export const ipcMessageReceiver: Plugin = { options: { store: Store }, ) => { window.backend.onReceivedIPCMsg({ - LOAD_PROJECT_FILE: (_, { filePath, confirm } = {}) => - void options.store.actions.LOAD_PROJECT_FILE({ filePath, confirm }), + LOAD_PROJECT_FILE: (_, { filePath } = {}) => + void options.store.actions.LOAD_PROJECT_FILE({ filePath }), DETECT_MAXIMIZED: () => options.store.actions.DETECT_MAXIMIZED(), diff --git a/src/store/project.ts b/src/store/project.ts index ebeb21d0fd..48da368714 100755 --- a/src/store/project.ts +++ b/src/store/project.ts @@ -171,7 +171,7 @@ export const projectStore = createPartialStore({ action: createUILockAction( async ( { actions, mutations, getters }, - { filePath, confirm }: { filePath?: string; confirm?: boolean }, + { filePath }: { filePath?: string }, ) => { if (!filePath) { // Select and load a project File. @@ -199,7 +199,7 @@ export const projectStore = createPartialStore({ projectJson: text, }); - if (confirm !== false && getters.IS_EDITED) { + if (getters.IS_EDITED) { const result = await actions.SAVE_OR_DISCARD_PROJECT_FILE({ additionalMessage: "プロジェクトをロードすると現在のプロジェクトは破棄されます。", diff --git a/src/store/type.ts b/src/store/type.ts index 580165ebf1..fbf3a619e4 100644 --- a/src/store/type.ts +++ b/src/store/type.ts @@ -1809,7 +1809,7 @@ export type ProjectStoreTypes = { }; LOAD_PROJECT_FILE: { - action(payload: { filePath?: string; confirm?: boolean }): boolean; + action(payload: { filePath?: string }): boolean; }; SAVE_PROJECT_FILE: { diff --git a/src/type/ipc.ts b/src/type/ipc.ts index d4c64162fe..d71685f5ac 100644 --- a/src/type/ipc.ts +++ b/src/type/ipc.ts @@ -244,7 +244,7 @@ export type IpcIHData = { */ export type IpcSOData = { LOAD_PROJECT_FILE: { - args: [obj: { filePath?: string; confirm?: boolean }]; + args: [obj: { filePath?: string }]; return: void; };