Files
discord-decomp/_bundle/Module441.js
T
2026-11-01 12:12:55 +02:00

61 lines
2.0 KiB
JavaScript

// Metro module 441 (f442).
import { FALLBACK_ESTIMATED_HEIGHT, INITIAL_NUM_TO_RENDER } from "./Module442";
import ReactNativeElement from "./ReactNativeElement";
export default {
initial: {
itemCount: INITIAL_NUM_TO_RENDER,
spacerStyle: (a0) => ({
height: a0 * FALLBACK_ESTIMATED_HEIGHT
})
},
next: ({ target, targetRect, thresholdRect }) => {
let r53;
let c12330_0;
c12330_0 = void 0;
if (target instanceof ReactNativeElement) {
const r41 = Math.min(targetRect.y + targetRect.height, thresholdRect.y + thresholdRect.height) - Math.max(targetRect.y, thresholdRect.y);
let previousElementSibling = target.previousElementSibling;
const r7 = previousElementSibling != null;
let r1 = 0;
let r44 = target;
if (r7) {
const r48 = previousElementSibling.nodeName.startsWith("RN:VirtualView");
let r0 = 0;
r1 = 0;
r44 = target;
if (r48) {
do {
const r2 = r0 + 1;
const previousElementSibling2 = previousElementSibling.previousElementSibling;
const r50 = previousElementSibling;
r1 = r2;
r44 = r50;
if (!(r2 < 3)) {
break;
}
r1 = r2;
r44 = r50;
if (previousElementSibling2 == null) {
break;
}
r53 = previousElementSibling2.nodeName.startsWith("RN:VirtualView");
previousElementSibling = previousElementSibling2;
r0 = r2;
r1 = r0;
r44 = r50;
} while (r53);
}
}
const r54 = 0 < r1 ? (target.getBoundingClientRect().top - r44.getBoundingClientRect().top) / r1 : FALLBACK_ESTIMATED_HEIGHT;
c12330_0 = r54;
return {
itemCount: r41 / r54,
spacerStyle: (a0) => ({
height: a0 * c12330_0
})
};
}
throw new Error("Expected target to be a ReactNativeElement. VirtualColumn requires DOM APIs to be enabled in React Native.");
}
};