This commit is contained in:
janisslsm committed 2026-11-01 12:12:55 +02:00
1 parent 1781d25a15
commit 732c0ad767
33051 files changed
+2591613 -3019689

No files matched your search

@@ -0,0 +1,28 @@
// Metro module 9402 (f9403).
import { useRef, useMemo } from "react";
import UserStore from "../../../../../stores/UserStore";
import { useStateFromStores } from "../../../../../_bundle/Module589";
import PremiumUtils from "../../../../../utils/PremiumUtils";
import { debounce } from "../../../../../_bundle/Module12";
export default function useEmojiPickerViewableItemsChanged(a0) {
let c17193_0 = a0;
const ref = useRef(0);
const stateFromStores = useStateFromStores([UserStore], () => {
const currentUser = UserStore.getCurrentUser();
const canUseEmojisEverywhere = PremiumUtils.canUseEmojisEverywhere(currentUser);
return canUseEmojisEverywhere ? !PremiumUtils.canUseAnimatedEmojis(currentUser) : !canUseEmojisEverywhere;
});
return useMemo(() => {
let c26433_0 = debounce(() => {
c17193_0(ref.current > 7);
}, 200);
return {
onViewableItemsChanged: stateFromStores ? (a0) => {
for (const item of a0.changed) {
ref.current = Math.max(0, ref.current + (item.item?.isSectionNitroLocked === true ? item.isViewable ? 1 : -1 : 0));
}
c26433_0();
} : void 0
};
}, [a0, stateFromStores]);
};