diff --git a/src/services/view/interface.ts b/src/services/view/interface.ts index 69224435..5711ca24 100644 --- a/src/services/view/interface.ts +++ b/src/services/view/interface.ts @@ -73,11 +73,12 @@ export const ViewServiceIPCDescriptor = { forEachView: ProxyPropertyType.Function, getActiveBrowserView: ProxyPropertyType.Function, getAllViewOfWorkspace: ProxyPropertyType.Function, - initializeWorkspaceViewHandlersAndLoad: ProxyPropertyType.Function, + getSharedWebPreferences: ProxyPropertyType.Function, getView: ProxyPropertyType.Function, getViewCount: ProxyPropertyType.Function, getViewCurrentUrl: ProxyPropertyType.Function, hideView: ProxyPropertyType.Function, + initializeWorkspaceViewHandlersAndLoad: ProxyPropertyType.Function, realignActiveView: ProxyPropertyType.Function, reloadActiveBrowserView: ProxyPropertyType.Function, reloadViewsWebContents: ProxyPropertyType.Function, diff --git a/src/services/windows/index.ts b/src/services/windows/index.ts index 95b948bd..e43062c4 100644 --- a/src/services/windows/index.ts +++ b/src/services/windows/index.ts @@ -245,8 +245,12 @@ export class Window implements IWindowService { }); } await this.updateWindowBackground(newWindow); - // This loading will wait for a while - await newWindow.loadURL(newWindowURL); + // Not loading main window (like sidebar and background) here. Only load wiki in browserView in the secondary window. + const isWindowToLoadURL = windowName !== WindowNames.secondary; + if (isWindowToLoadURL) { + // This loading will wait for a while + await newWindow.loadURL(newWindowURL); + } await webContentLoadingPromise; return newWindow; } diff --git a/src/services/workspacesView/index.ts b/src/services/workspacesView/index.ts index bf651009..795902c8 100644 --- a/src/services/workspacesView/index.ts +++ b/src/services/workspacesView/index.ts @@ -211,7 +211,11 @@ export class WorkspaceView implements IWorkspaceViewService { public async openWorkspaceWindowWithView(workspace: IWorkspace, configs?: { uri?: string }): Promise { const uriToOpen = configs?.uri ?? workspace.lastUrl ?? workspace.homeUrl; - logger.debug('Open workspace in new window. uriToOpen here will overwrite the decision in initializeWorkspaceViewHandlersAndLoad.', { id: workspace.id, uriToOpen, function: 'openWorkspaceWindowWithView' }); + logger.debug('Open workspace in new window. uriToOpen here will overwrite the decision in initializeWorkspaceViewHandlersAndLoad.', { + id: workspace.id, + uriToOpen, + function: 'openWorkspaceWindowWithView', + }); const browserWindow = await this.windowService.open(WindowNames.secondary, undefined, undefined, true); const sharedWebPreferences = await this.viewService.getSharedWebPreferences(workspace); const view = await this.viewService.createViewAddToWindow(workspace, browserWindow, sharedWebPreferences); diff --git a/src/services/workspacesView/interface.ts b/src/services/workspacesView/interface.ts index 3d284190..b57d3e49 100644 --- a/src/services/workspacesView/interface.ts +++ b/src/services/workspacesView/interface.ts @@ -88,6 +88,7 @@ export const WorkspaceViewServiceIPCDescriptor = { initializeWorkspaceView: ProxyPropertyType.Function, loadURL: ProxyPropertyType.Function, openUrlInWorkspace: ProxyPropertyType.Function, + openWorkspaceWindowWithView: ProxyPropertyType.Function, printTiddler: ProxyPropertyType.Function, realignActiveWorkspace: ProxyPropertyType.Function, removeWorkspaceView: ProxyPropertyType.Function,