mirror of
https://github.com/tiddly-gittly/TidGi-Desktop.git
synced 2026-01-22 20:41:39 -08:00
fix: initializeWorkspaceViewHandlersAndLoad not exposed in window
This commit is contained in:
parent
0156e80bbd
commit
d89d00d4cd
4 changed files with 14 additions and 4 deletions
|
|
@ -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,
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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);
|
||||
|
|
|
|||
|
|
@ -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,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue