🐛 Hiding the main interface and then opening it from the taskbar icon will cause the interface to hang Fix https://github.com/siyuan-note/siyuan/issues/8489

This commit is contained in:
Daniel 2023-06-08 11:54:52 +08:00
parent c392fb0b11
commit a2ff4d753b
No known key found for this signature in database
GPG key ID: 86211BA83DF03017

View file

@ -307,10 +307,7 @@ const boot = () => {
if (currentWindow.isMinimized()) { if (currentWindow.isMinimized()) {
currentWindow.restore(); currentWindow.restore();
} }
if (!currentWindow.isVisible()) { currentWindow.show();
currentWindow.show();
}
currentWindow.focus();
setTimeout(() => { // 等待界面js执行完毕 setTimeout(() => { // 等待界面js执行完毕
writeLog(siyuanOpenURL); writeLog(siyuanOpenURL);
currentWindow.webContents.send("siyuan-openurl", siyuanOpenURL); currentWindow.webContents.send("siyuan-openurl", siyuanOpenURL);
@ -389,10 +386,7 @@ const showWindow = (wnd) => {
if (wnd.isMinimized()) { if (wnd.isMinimized()) {
wnd.restore(); wnd.restore();
} }
if (!wnd.isVisible()) { wnd.show();
wnd.show();
}
wnd.focus();
}; };
const initKernel = (workspace, port, lang) => { const initKernel = (workspace, port, lang) => {