Fix zoom reset on app init by removing preferred size handler

Co-authored-by: ayumi-signal <143036029+ayumi-signal@users.noreply.github.com>
This commit is contained in:
automated-signal
2025-11-20 13:16:28 -06:00
committed by GitHub
parent a62f457ef4
commit 3b9459b683
2 changed files with 0 additions and 3 deletions

View File

@@ -220,7 +220,6 @@ const defaultWebPrefs = {
getEnvironment() !== Environment.PackagedApp ||
!isProduction(app.getVersion()),
spellcheck: false,
enablePreferredSizeMode: true,
};
const DISABLE_IPV6 = process.argv.some(arg => arg === '--disable-ipv6');

View File

@@ -117,14 +117,12 @@ export class ZoomFactorService extends EventEmitter {
return;
}
window.webContents.on('preferred-size-changed', onWindowChange);
window.webContents.on('zoom-changed', onWindowChange);
this.on('zoomFactorChanged', onServiceChange);
this.#isListeningForZoom = true;
};
const stopListenForZoomEvents = () => {
window.webContents.off('preferred-size-changed', onWindowChange);
window.webContents.off('zoom-changed', onWindowChange);
this.off('zoomFactorChanged', onServiceChange);
this.#isListeningForZoom = false;