fix: add timeout for prevent ui lag (#6771)

This commit is contained in:
fake
2026-01-20 10:58:06 +03:00
committed by GitHub
parent bac9616de4
commit 81faa57808

View File

@@ -220,9 +220,15 @@ app.on('ready', async () => {
}
});
let boundsTimeout;
const handleBoundsChange = () => {
if (!mainWindow.isMaximized()) {
saveBounds(mainWindow);
if (boundsTimeout) {
clearTimeout(boundsTimeout);
}
boundsTimeout = setTimeout(() => {
saveBounds(mainWindow);
}, 100);
}
};