mirror of
https://github.com/wavetermdev/waveterm.git
synced 2025-02-26 03:24:03 +01:00
revised for pull #1582
This commit is contained in:
parent
ce30fcb260
commit
a68696b085
@ -702,13 +702,15 @@ ipcMain.on("delete-workspace", (event, workspaceId) => {
|
||||
|
||||
if (workspaceList.length > 1 && ww?.workspaceId == workspaceId){
|
||||
|
||||
const workspaceIdindex : any = workspaceList.findIndex(wse => wse.workspaceid === workspaceId);
|
||||
const workspaceIdindex = workspaceList.findIndex(wse => wse.workspaceid === workspaceId);
|
||||
|
||||
const moveIndex = (workspaceIdindex > 1) ? workspaceIdindex - 1 : workspaceIdindex + 1;
|
||||
const PrevNextWorkspace : any = workspaceList[moveIndex]
|
||||
const moveIndex = (workspaceIdindex > 0) ? workspaceIdindex - 1 : workspaceIdindex + 1;
|
||||
const prevNextWorkspace = workspaceList[moveIndex]
|
||||
|
||||
await ww.switchWorkspace(PrevNextWorkspace.workspaceid);
|
||||
relaunchBrowserWindows(); // the blank window bug from 0.10.1 OCCASIONALLY occurs if this is not here, ( issue #1567 )
|
||||
await ww.switchWorkspace(prevNextWorkspace.workspaceid);
|
||||
// this does it faster without restarting the window
|
||||
ww.activeTabView.webContents.reloadIgnoringCache(); // the blank window bug from 0.10.1 OCCASIONALLY occurs if this is not here, ( issue #1567 )
|
||||
|
||||
}
|
||||
|
||||
await WorkspaceService.DeleteWorkspace(workspaceId);
|
||||
|
Loading…
Reference in New Issue
Block a user