fix: initializeWorkspaceViewHandlersAndLoad not exposed in window

This commit is contained in:
lin onetwo 2023-12-28 01:36:01 +08:00
parent 0156e80bbd
commit d89d00d4cd
4 changed files with 14 additions and 4 deletions

View file

@ -211,7 +211,11 @@ export class WorkspaceView implements IWorkspaceViewService {
public async openWorkspaceWindowWithView(workspace: IWorkspace, configs?: { uri?: string }): Promise<void> {
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);

View file

@ -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,