[READ-ONLY] Mirror of https://github.com/probablykasper/ferrum. Music library app for Mac, Linux and Windows ferrum.kasper.space
electron linux macos music music-library music-player napi windows
0

Configure Feed

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

Fix selection glitch when scrolling

Kasper (May 27, 2025, 9:39 AM +0200) 1c4ab038 b55635a5

+11 -3
+11 -3
src/components/TrackList.svelte
··· 421 421 if (i % 2 === 0) { 422 422 row_class += 'odd' 423 423 } 424 + if (selection.items.has(track.item_id)) { 425 + row_class += ' selected' 426 + } 424 427 return { 425 428 ...track, 426 429 index: i + 1, 427 - row_class, 430 + row_class: row_class.trim(), 428 431 } 429 432 }) 430 433 ··· 445 448 } 446 449 }) 447 450 448 - $: $selection, apply_selection(selection) 449 - function apply_selection(selection: SvelteSelection<ItemId>) { 451 + $: $selection, apply_selection() 452 + function apply_selection() { 450 453 const rows = grid.querySelectorAll('.rgRow') 451 454 for (const row of rows) { 452 455 const row_index = parseInt(row.getAttribute('data-rgrow') ?? '') ··· 458 461 } 459 462 } 460 463 } 464 + onMount(() => { 465 + // apply_selection when scrolling and such 466 + grid.addEventListener('afterrender', apply_selection) 467 + return () => grid.removeEventListener('afterrender', apply_selection) 468 + }) 461 469 462 470 // let col_container: HTMLElement 463 471 // let col_drag_line: HTMLElement