Skip to content

Commit

Permalink
fix: app switch issue
Browse files Browse the repository at this point in the history
  • Loading branch information
everright committed Apr 25, 2022
1 parent c5ced9c commit 94eea3b
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions src/app/electron-main/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -214,8 +214,7 @@ try {
} else if (arg.action === 'hook') {
returnValue = 'hook返回';
} else if (arg.action === 'openApp') {
if(subView.appView) subView.appView.remove();
if (arg.data.moduleID&&!arg.data.moduleID.includes('@eo-core')) {
if (arg.data.moduleID && !arg.data.moduleID.includes('@eo-core')) {
// 如果要打开是同一app,忽略
if (subView.appView?.mainModuleID === arg.data.moduleID) {
return;
Expand All @@ -225,6 +224,10 @@ try {
if (!subView.appView) subView.appView = new AppViews(win);
subView.appView.create(module);
}
} else {
if (subView.appView) {
subView.appView.remove();
}
}
returnValue = 'view id';
} else if (arg.action === 'autoResize') {
Expand Down

0 comments on commit 94eea3b

Please sign in to comment.