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

43 lines
1.9 KiB
React

// Metro module 402 (f403).
import _slicedToArray from "./_slicedToArray";
import { cloneElement, useMemo } from "react";
import splitLayoutProps from "./splitLayoutProps";
import flattenStyle from "./flattenStyle";
import Module404 from "./Module404";
import useMergeRefs from "./useMergeRefs";
import Wrapper from "./Wrapper_349";
import Module254 from "./Module254";
import createAnimatedComponent from "./createAnimatedComponent";
let Component;
const AnimatedScrollViewWithInvertedRefreshControl = function AnimatedScrollViewWithInvertedRefreshControl(props) {
const { ref, ...rest } = props;
let c12314_0 = rest;
const memo = useMemo(() => {
const r15 = splitLayoutProps(flattenStyle(c12314_0.style));
return {
intermediatePropsForRefreshControl: {
style: r15.outer
},
intermediatePropsForScrollView: {
...c12314_0,
style: r15.inner
}
};
}, [rest]);
const { intermediatePropsForRefreshControl, intermediatePropsForScrollView } = memo;
const r9 = _slicedToArray(Module404(intermediatePropsForRefreshControl), 2);
const r27 = r9[0];
const refreshControl = cloneElement(rest.refreshControl, {
...r27,
ref: r9[1]
});
const r36 = _slicedToArray(Module404(intermediatePropsForScrollView), 2);
const props2 = r36[0];
return <Wrapper {...props2} ref={useMergeRefs(r36[1], ref)} refreshControl={refreshControl} style={Module254.compose(props2.style, r27.style)} />;
};
Component = createAnimatedComponent(Wrapper);
export default function AnimatedScrollViewWithOrWithoutInvertedRefreshControl(props) {
const { ref, ...props2 } = props;
return props2.refreshControl != null && props2.style != null ? <AnimatedScrollViewWithInvertedRefreshControl scrollEventThrottle={0.0001} {...props2} ref={ref} refreshControl={props2.refreshControl} /> : <Component scrollEventThrottle={0.0001} {...props2} ref={ref} />;
};