mirror of
https://github.com/usebruno/bruno.git
synced 2026-06-22 04:05:42 +00:00
fix: add timeout for prevent ui lag (#6771)
This commit is contained in:
@@ -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);
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user