WebUI: implement debounce behavior for resize events

This commit is contained in:
Chocobo1 2024-08-09 17:48:03 +08:00
parent 0c580c3174
commit 29379232aa
No known key found for this signature in database
GPG key ID: 210D9C873253A68C
6 changed files with 43 additions and 31 deletions

View file

@ -502,9 +502,9 @@ window.qBittorrent.Search ??= (() => {
paddingHorizontal: 0,
width: loadWindowWidth(id, 600),
height: loadWindowHeight(id, 360),
onResize: function() {
onResize: window.qBittorrent.Misc.createDebounceHandler(500, (e) => {
saveWindowSize(id);
},
}),
onBeforeBuild: function() {
loadSearchPlugins();
},