Skipped 1 file(s) >100MB (GitHub limit): source/__polyfill/04xxx/module_4759.js (118.4 MB)
118 lines
4.3 KiB
TypeScript
118 lines
4.3 KiB
TypeScript
// Module ID: 16315
|
|
// Function ID: 16316
|
|
// Name: GuildsBar
|
|
// Dependencies: [19, 21, 4574, 1115, 9642, 16316, 16325, 16213, 11564, 6669, 5603, 7086, 16394, 10270, 2]
|
|
|
|
// Module 16315 (GuildsBar)
|
|
import NativeViewDefault from "NativeView" /* 5603 */;
|
|
import FastListDefault from "FastList" /* 7086 */;
|
|
import FavoritesGuildIntroPopoverDefault from "FavoritesGuildIntroPopover" /* 10270 */;
|
|
import StartupProfilerDefault from "StartupProfiler" /* 11564 */;
|
|
import registerSidebarVisibilityMethods from "registerSidebarVisibilityMethods" /* 16213 */;
|
|
import useGuildsBarGestureDefault from "useGuildsBarGesture" /* 16316 */;
|
|
import useGuildsBarPropsDefault from "useGuildsBarProps" /* 16325 */;
|
|
import GuildsBarDragPreviewDefault from "GuildsBarDragPreview" /* 16394 */;
|
|
import noop from "module_19" /* 19 */;
|
|
|
|
require = fn;
|
|
const jsxProd = fn(21);
|
|
({ jsx: closure_4, jsxs: hasOwnProperty } = jsxProd);
|
|
const createStyles = fn(4574);
|
|
let closure_6 = createStyles.createStyles({ wrapper: { position: "relative", overflow: "visible", flex: 1 } });
|
|
const size = fn(2);
|
|
let result = size.fileFinishedImporting("modules/guilds_bar/native/GuildsBar.tsx");
|
|
|
|
export default noop.memo(function GuildsBar(enableHome) {
|
|
let flag = enableHome.enableHome;
|
|
if (flag === undefined) {
|
|
flag = false;
|
|
}
|
|
let tmp4 = useGuildsBarGestureDefault();
|
|
const fastListRef = tmp4.fastListRef;
|
|
({ scrollPosition, gesture, scrollerRef, persistantKeys, onFastListScroll, onFastListScrollWorklet } = tmp4);
|
|
let tmp = closure_6();
|
|
({ listProps, listDataProps } = useGuildsBarPropsDefault(fastListRef));
|
|
const items = [fastListRef];
|
|
const effect = noop.useEffect(() => {
|
|
const result = registerSidebarVisibilityMethods.registerGuildVisibilityMethod(fastListRef);
|
|
}, items);
|
|
closure_129_0 = listProps;
|
|
closure_129_1 = fastListRef;
|
|
closure_129_2 = noop.useRef(listProps);
|
|
closure_129_3 = noop.useRef(false);
|
|
const effect1 = noop.useEffect(() => {
|
|
if (obj.isAndroid()) {
|
|
closure_0 = ref(tmp[4]).addOnPipModeChangedListener((arg0) => {
|
|
if (arg0) {
|
|
ref3.current = true;
|
|
}
|
|
});
|
|
return () => {
|
|
let removeResult;
|
|
if (closure_0 != null) {
|
|
removeResult = closure_0.remove();
|
|
}
|
|
return removeResult;
|
|
};
|
|
}
|
|
obj = fastListRef(ref2[3]);
|
|
tmp = ref2;
|
|
}, []);
|
|
const items1 = [fastListRef, listProps];
|
|
const effect2 = noop.useEffect(() => {
|
|
const current = ref2.current;
|
|
ref2.current = fastListRef;
|
|
if (ref3.current) {
|
|
let num = tmp.chunkBase;
|
|
if (num == null) {
|
|
num = 0;
|
|
}
|
|
let num2 = current.chunkBase;
|
|
if (num2 == null) {
|
|
num2 = 0;
|
|
}
|
|
if (num > num2) {
|
|
tmp2.current = false;
|
|
if (tmp4) {
|
|
const current2 = ref.current;
|
|
if (current2 != null) {
|
|
const blocks = current2.computeBlocks();
|
|
}
|
|
}
|
|
tmp4 = tmp.insetStart === current.insetStart && tmp.insetEnd === current.insetEnd;
|
|
}
|
|
}
|
|
}, items1);
|
|
let obj = { profile: null, children: null };
|
|
const tmp5 = useGuildsBarPropsDefault(fastListRef);
|
|
obj.profile = fastListRef(11564).Profiles.Guilds;
|
|
const obj2 = { gesture, children: null };
|
|
const obj3 = { style: tmp.wrapper, collapsable: false, nativeID: "guilds-bar-view", children: null };
|
|
const tmp10 = StartupProfilerDefault;
|
|
const tmp11 = closure_5;
|
|
const obj4 = {};
|
|
const tmp12 = NativeViewDefault;
|
|
const merged = Object.assign(listProps);
|
|
const merged1 = Object.assign(listDataProps);
|
|
obj4.ref = fastListRef;
|
|
obj4.manualRef = scrollerRef;
|
|
obj4.disableContentWrappers = true;
|
|
obj4.onScroll = onFastListScroll;
|
|
obj4.onScrollWorklet = onFastListScrollWorklet;
|
|
obj4.scrollPosValue = scrollPosition;
|
|
obj4.stickySectionsVariant = "sticky-mount";
|
|
obj4.optimizeListItemRender = true;
|
|
obj4.persistantKeys = persistantKeys;
|
|
obj4.disableRecyclingOnFullCompute = true;
|
|
let obj5;
|
|
if (flag) {
|
|
obj5 = { overflow: "visible" };
|
|
}
|
|
obj4.style = obj5;
|
|
obj4.nativeID = "guilds-bar-fast-list";
|
|
const items2 = [closure_4(FastListDefault, obj4), closure_4(GuildsBarDragPreviewDefault, {}), closure_4(FavoritesGuildIntroPopoverDefault, {})];
|
|
obj3.children = items2;
|
|
obj2.children = tmp11(tmp12, obj3);
|
|
obj.children = closure_4(fastListRef(6669).GestureDetector, obj2);
|
|
return closure_4(tmp10, obj);
|
|
});
|