a simple web player for subsonic tinysub.devins.page
subsonic navidrome javascript
11
fork

Configure Feed

Select the types of activity you want to include in your feed.

fix: remove virtual scroll resize debounce

causes issues and i dont think that was the culprit of the window resize lag

intergrav 1664d5ec b1d0ffed

+1 -6
+1 -6
src/js/virtual-scroll.js
··· 21 21 }); 22 22 this.visibleStart = this.visibleEnd = 0; 23 23 this.rafId = null; 24 - this.resizeTimeout = null; 25 24 this.firstRender = true; 26 25 this.rowHeight = 0; 27 26 28 27 this.handleScroll = () => this.scheduleRender(); 29 - this.handleResize = () => { 30 - clearTimeout(this.resizeTimeout); 31 - this.resizeTimeout = setTimeout(() => this.render(), 150); 32 - }; 28 + this.handleResize = () => this.scheduleRender(); 33 29 34 30 this.container.addEventListener("scroll", this.handleScroll, { 35 31 passive: true, ··· 120 116 // clean up event listeners and cancel pending renders 121 117 destroy() { 122 118 cancelAnimationFrame(this.rafId); 123 - clearTimeout(this.resizeTimeout); 124 119 this.container.removeEventListener("scroll", this.handleScroll); 125 120 window.removeEventListener("resize", this.handleResize); 126 121 }