/* Metro module 14047; source: modules/collectibles/native/hooks/useScrollToInitialIndexOnce.tsx; dependencies: [31, 2] */ import * as FileImportTrackerModule from '../../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */ import * as ReactModule from '../../../../by-id/module-00031-React.js'; /* Metro dependency 31 */ function _fun106528(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#106528, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14244:6, offset: 0x022df4ca, size: 115 bytes, params: 8, frame: 17 const Object = global.Object; Object.defineProperty(exports, '__esModule', {value: true}); (FileImportTrackerModule).fileFinishedImporting('modules/collectibles/native/hooks/useScrollToInitialIndexOnce.tsx'); exports.INITIAL_SCROLL_DELAY_MS = 100; exports.useScrollToInitialIndexOnce = useScrollToInitialIndexOnce; function useScrollToInitialIndexOnce({initialScrollIndex, shouldScroll, flashListRef, afterMs}) { // fn#106529, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14244:265, offset: 0x022df53d, size: 121 bytes, params: 2, frame: 18 const initialScrollIndex2 = initialScrollIndex; afterMs = afterMs === undefined ? 100 : afterMs; const binding = initialScrollIndex2; const env0_4 = binding.useRef(false); binding.useEffect(_fun106530, [shouldScroll, initialScrollIndex, afterMs, flashListRef]); function _fun106530() { // fn#106530, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14244:402, offset: 0x022df5b6, size: 83 bytes, params: 1, frame: 13 if (initialScrollIndex != null && shouldScroll && !env0_4.current) { env0_4.current = true; global.setTimeout(function() { var current = flashListRef.current; if (current != null) { current.scrollToIndex({animated: true, index: initialScrollIndex}); } }, afterMs); } } } } global.__d(_fun106528, 14047, [31, 2]) /* metro module 14047, dependencies: [31, 2] */;