PinDMs: fix scrolling issues when using many pins (#4414)

very silly math error...
This commit is contained in:
jax 2026-07-18 13:37:38 -04:00 • committed by GitHub
parent 2b6e228261
commit a6e1c7a462
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -212,7 +212,7 @@ export default definePlugin({
const sectionHeaderSizePx = sections.length * 40;
// (header heights + DM heights + DEFAULT_CHUNK_SIZE) * 1.5
// we multiply everything by 1.5 so it only gets unmounted after the entire list is off screen
return (sectionHeaderSizePx + sections.reduce((acc, v) => acc += v + 44, 0) + DEFAULT_CHUNK_SIZE) * 1.5;
return (sectionHeaderSizePx + sections.reduce((acc, v) => acc += v * 44, 0) + DEFAULT_CHUNK_SIZE) * 1.5;
},
isCategoryIndex(sectionIndex: number) {