mirror of
https://github.com/tiddly-gittly/TidGi-Desktop.git
synced 2026-01-26 06:21:18 -08:00
parent
b5b0e4f3a7
commit
74e32d78f5
11 changed files with 62 additions and 39 deletions
|
|
@ -1,3 +1,4 @@
|
|||
/* eslint-disable @typescript-eslint/strict-boolean-expressions */
|
||||
/* eslint-disable @typescript-eslint/promise-function-async */
|
||||
/* eslint-disable unicorn/no-null */
|
||||
/* eslint-disable @typescript-eslint/require-await */
|
||||
|
|
@ -373,6 +374,10 @@ export class WorkspaceView implements IWorkspaceViewService {
|
|||
return;
|
||||
}
|
||||
if (workspaceToRestart.isSubWiki) {
|
||||
const mainWikiIDToRestart = workspaceToRestart.mainWikiID;
|
||||
if (mainWikiIDToRestart) {
|
||||
await this.restartWorkspaceViewService(mainWikiIDToRestart);
|
||||
}
|
||||
return;
|
||||
}
|
||||
logger.info(`Restarting workspace ${workspaceToRestart.id}`);
|
||||
|
|
@ -470,6 +475,13 @@ export class WorkspaceView implements IWorkspaceViewService {
|
|||
private async realignActiveWorkspaceView(id?: string): Promise<void> {
|
||||
const workspaceToRealign = id === undefined ? await this.workspaceService.getActiveWorkspace() : await this.workspaceService.get(id);
|
||||
logger.debug(`realignActiveWorkspaceView() activeWorkspace.id: ${workspaceToRealign?.id ?? 'undefined'}`, { stack: new Error('stack').stack?.replace('Error:', '') });
|
||||
if (workspaceToRealign?.isSubWiki) {
|
||||
logger.debug(`realignActiveWorkspaceView() skip because ${workspaceToRealign.id} is a subwiki. Realign main wiki instead.`);
|
||||
if (workspaceToRealign.mainWikiID) {
|
||||
await this.realignActiveWorkspaceView(workspaceToRealign.mainWikiID);
|
||||
}
|
||||
return;
|
||||
}
|
||||
const mainWindow = this.windowService.get(WindowNames.main);
|
||||
const menuBarWindow = this.windowService.get(WindowNames.menuBar);
|
||||
const mainBrowserViewWebContent = mainWindow?.getBrowserView()?.webContents;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue