mirror of
https://github.com/toeverything/AFFiNE.git
synced 2026-07-24 22:09:08 +08:00
feat(nbstore): share worker between workspaces (#9947)
This commit is contained in:
@@ -269,12 +269,6 @@ export async function openUrlInHiddenWindow(urlObj: URL) {
|
||||
win.webContents.openDevTools();
|
||||
}
|
||||
|
||||
win.on('close', e => {
|
||||
e.preventDefault();
|
||||
if (win && !win.isDestroyed()) {
|
||||
win.destroy();
|
||||
}
|
||||
});
|
||||
logger.info('loading page at', url);
|
||||
win.loadURL(url).catch(e => {
|
||||
logger.error('failed to load url', e);
|
||||
|
||||
@@ -395,7 +395,9 @@ export class WebContentViewsManager {
|
||||
|
||||
if (this.mainWindow && view) {
|
||||
this.mainWindow.contentView.removeChildView(view);
|
||||
view?.webContents.close();
|
||||
view?.webContents.close({
|
||||
waitForBeforeUnload: true,
|
||||
});
|
||||
}
|
||||
}, 500); // delay a bit to get rid of the flicker
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user