Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion src/backend/electron/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down
4 changes: 2 additions & 2 deletions src/plugins/ipcMessageReceiverPlugin.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@ export const ipcMessageReceiver: Plugin = {
options: { store: Store<State, AllGetters, AllActions, AllMutations> },
) => {
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(),

Expand Down
4 changes: 2 additions & 2 deletions src/store/project.ts
Original file line number Diff line number Diff line change
Expand Up @@ -171,7 +171,7 @@ export const projectStore = createPartialStore<ProjectStoreTypes>({
action: createUILockAction(
async (
{ actions, mutations, getters },
{ filePath, confirm }: { filePath?: string; confirm?: boolean },
{ filePath }: { filePath?: string },
) => {
if (!filePath) {
// Select and load a project File.
Expand Down Expand Up @@ -199,7 +199,7 @@ export const projectStore = createPartialStore<ProjectStoreTypes>({
projectJson: text,
});

if (confirm !== false && getters.IS_EDITED) {
if (getters.IS_EDITED) {
const result = await actions.SAVE_OR_DISCARD_PROJECT_FILE({
additionalMessage:
"プロジェクトをロードすると現在のプロジェクトは破棄されます。",
Expand Down
2 changes: 1 addition & 1 deletion src/store/type.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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: {
Expand Down
2 changes: 1 addition & 1 deletion src/type/ipc.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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;
};

Expand Down
Loading