fix: remember zoom level on refresh #52

This commit is contained in:
leukipp
2025-08-27 20:02:59 +02:00
parent fe0667919e
commit 32409983b2
+6 -1
View File
@@ -274,6 +274,7 @@ const reloadView = () => {
} else { } else {
view.webContents.reloadIgnoringCache(); view.webContents.reloadIgnoringCache();
} }
update();
}; };
/** /**
@@ -564,9 +565,10 @@ const domEvents = () => {
// Update webview layout // Update webview layout
view.webContents.on("dom-ready", () => { view.webContents.on("dom-ready", () => {
view.webContents.insertCSS("::-webkit-scrollbar { display: none; }"); view.webContents.insertCSS("::-webkit-scrollbar { display: none; }");
if (ready.length < WEBVIEW.views.length) {
view.webContents.setZoomFactor(WEBVIEW.viewZoom); view.webContents.setZoomFactor(WEBVIEW.viewZoom);
WEBVIEW.initialized = true;
ready.push(i); ready.push(i);
}
}); });
// Webview fully loaded // Webview fully loaded
@@ -621,6 +623,9 @@ const appEvents = () => {
} }
WEBVIEW.window.focus(); WEBVIEW.window.focus();
}); });
// Webview initialized
WEBVIEW.initialized = true;
}; };
/** /**