decord/source/components_native/MainChannels.tsx

142 lines
5.4 KiB
TypeScript
Raw Normal View History

2026-08-15 05:55:55 +00:00
// Module ID: 15281
// Function ID: 15282
2026-08-03 11:20:01 +00:00
// Name: LeftPanelContent
2026-08-15 05:55:55 +00:00
// Dependencies: [32, 19, 17, 676, 21, 15282, 6804, 4661, 712, 4232, 1629, 15283, 15284, 15285, 15366, 15544, 4115, 15288, 15624, 4235, 10725, 2]
2026-07-20 16:05:17 +00:00
2026-08-15 05:55:55 +00:00
// Module 15281 (LeftPanelContent)
2026-07-23 10:11:24 +00:00
import _slicedToArray from "_slicedToArray";
2026-08-03 11:20:01 +00:00
import importAllResult from "MobileHomeDrawerExperiment";
import get_ActivityIndicator from "context";
2026-07-23 10:11:24 +00:00
import ME from "ME";
2026-08-03 11:20:01 +00:00
import jsxProd from "set";
2026-07-29 08:29:29 +00:00
import createCacheKey from "createCacheKey";
2026-07-20 16:05:17 +00:00
2026-07-29 08:29:29 +00:00
let c10;
let c5;
let c9;
2026-07-23 10:11:24 +00:00
let closure_6;
2026-07-29 08:29:29 +00:00
const require = arg1;
2026-08-03 11:20:01 +00:00
function LeftPanelContent(panelStyles) {
panelStyles = panelStyles.panelStyles;
2026-07-29 08:29:29 +00:00
let first;
let isChatBesideChannelList;
2026-08-03 11:20:01 +00:00
let top;
const tmp = callback3();
first = undefined;
isChatBesideChannelList = undefined;
let obj = first(top[5]);
2026-07-29 08:29:29 +00:00
const tmp4 = callback(obj.useGuildsRouteGuildAndChannelId(), 2);
first = tmp4[0];
let obj1 = importAllResult;
const ref = importAllResult.useRef(first);
isChatBesideChannelList = ref;
let items = [first];
const effect = importAllResult.useEffect(() => {
isChatBesideChannelList.current = first;
}, items);
let tmp8 = null != first;
if (tmp8) {
tmp8 = first !== ME;
}
2026-08-03 11:20:01 +00:00
let tmp11 = isChatBesideChannelList(tmp3[6])(ref);
2026-07-29 08:29:29 +00:00
if (tmp8) {
tmp11 = first;
}
2026-08-03 11:20:01 +00:00
isChatBesideChannelList = tmp10(tmp3[9])().isChatBesideChannelList;
top = tmp10(tmp3[10])().top;
const items1 = [tmp, top];
const items2 = [tmp, isChatBesideChannelList];
2026-07-29 08:29:29 +00:00
const memo = obj1.useMemo(() => {
2026-08-03 11:20:01 +00:00
const items = [first.sideContainer, { marginTop: top }];
return items;
}, items1);
const memo1 = obj1.useMemo(() => {
2026-07-29 08:29:29 +00:00
const items = [first.side, ];
2026-07-20 16:05:17 +00:00
let sideTablet = isChatBesideChannelList;
if (isChatBesideChannelList) {
2026-07-29 08:29:29 +00:00
sideTablet = first.sideTablet;
2026-07-20 16:05:17 +00:00
}
items[1] = sideTablet;
return items;
2026-08-03 11:20:01 +00:00
}, items2);
const sum = DM_WIDTH + tmp10(tmp3[11])();
2026-07-20 16:05:17 +00:00
let num = 0;
2026-07-29 08:29:29 +00:00
if (tmp8) {
2026-07-20 16:05:17 +00:00
num = 1;
}
2026-08-03 11:20:01 +00:00
obj = { activeIndex: num, children: null };
const items3 = [callback2(isChatBesideChannelList(top[13]), { style: memo1 }), callback2(isChatBesideChannelList(top[14]), { style: memo1, selectedGuildId: tmp11, selectedChannelId: tmp4[1] })];
obj[1] = items3;
const tmp15Result = closure_10(first(top[12]).NativeFreezeScreens, obj);
const items4 = [absoluteFill.absoluteFill, ];
let tmp19;
if (isChatBesideChannelList) {
tmp19 = sum;
}
obj = { style: items4, children: null };
items4[1] = { width: tmp19 };
const items5 = [callback2(first(top[15]).HomePanelContent, {}), ];
if (null == panelStyles) {
obj1 = { style: null, pointerEvents: "box-none", nativeID: "messages-parent-view", children: null };
obj1[0] = memo;
obj1[3] = tmp15Result;
let tmp16Result = tmp16(tmp18, obj1);
} else {
const obj2 = { style: null, pointerEvents: "box-none", nativeID: "messages-parent-view", children: null };
const items6 = [panelStyles, tmp.sideContainer];
obj2[0] = items6;
obj2[3] = tmp15Result;
tmp16Result = tmp16(tmp10(tmp3[16]).View, obj2);
}
items5[1] = tmp16Result;
obj[1] = items5;
return closure_10(closure_5, obj);
}
function LeftPanelHomeDrawerContainer() {
let gesture;
let homeDrawerContext;
let panelStyles;
2026-08-15 05:55:55 +00:00
let obj = require(15288) /* context */;
2026-08-03 11:20:01 +00:00
const homeGesture = obj.useHomeGesture();
({ gesture, panelStyles, homeDrawerContext } = homeGesture);
obj = { value: homeDrawerContext, children: null };
obj = { gesture, children: null };
obj[1] = callback2(LeftPanelContent, { panelStyles });
2026-08-15 05:55:55 +00:00
obj[1] = callback2(require(15624) /* NonCollapsableGestureDetector */.NonCollapsableGestureDetector, obj);
return callback2(require(15288) /* context */.HomeDrawerStateContext.Provider, obj);
2026-08-03 11:20:01 +00:00
}
let c4 = importAllResult;
({ View: c5, StyleSheet: closure_6 } = get_ActivityIndicator);
const DM_WIDTH = ME.DM_WIDTH;
ME = ME.ME;
({ jsx: c9, jsxs: c10 } = jsxProd);
let obj = { fill: { flex: 1 }, sideContainer: null, side: null, sideTablet: null };
obj = { position: "absolute", top: 0, left: DM_WIDTH, bottom: 0, right: 0, flexDirection: "row", borderLeftWidth: 1, borderTopWidth: 1, borderColor: require("Themes").colors.APP_FRAME_BORDER, borderTopLeftRadius: require("Themes").radii.xl };
obj[1] = obj;
createCacheKey = { borderTopLeftRadius: require("Themes").radii.xl - 1, borderTopRightRadius: require("Themes").radii.none };
obj[2] = createCacheKey;
obj[3] = { borderTopRightRadius: require("Themes").modules.mobile.CHANNEL_DRAWER_CORNER_RADIUS };
let closure_11 = createCacheKey.createStyles(obj);
let closure_14 = importAllResult.memo(function LeftMenuTabsInner() {
2026-08-15 05:55:55 +00:00
const MobileHomeDrawerExperiment = require(4235) /* MobileHomeDrawerExperiment */.MobileHomeDrawerExperiment;
2026-08-03 11:20:01 +00:00
if (MobileHomeDrawerExperiment.useConfig({ location: "gesture" }).enableHome) {
let tmp2Result = tmp2(LeftPanelHomeDrawerContainer, {});
} else {
const obj = { style: null, children: null };
obj[0] = tmp.fill;
obj[1] = tmp2(LeftPanelContent, {});
tmp2Result = tmp2(closure_5, obj);
}
return tmp2Result;
2026-07-20 16:05:17 +00:00
});
2026-07-29 08:29:29 +00:00
let obj2 = { borderTopRightRadius: require("Themes").modules.mobile.CHANNEL_DRAWER_CORNER_RADIUS };
2026-07-23 10:11:24 +00:00
const memoResult = importAllResult.memo(function MainChannelsRedesignInner() {
2026-07-29 08:29:29 +00:00
const obj = { profile: null, children: null };
2026-08-15 05:55:55 +00:00
obj[0] = require(10725) /* setLevels */.Profiles.LeftPanel;
2026-08-03 11:20:01 +00:00
obj[1] = callback2(closure_14, {});
2026-08-15 05:55:55 +00:00
return callback2(importDefault(10725), obj);
2026-07-20 16:05:17 +00:00
});
2026-07-23 10:11:24 +00:00
const result = require("get ActivityIndicator").fileFinishedImporting("components_native/MainChannels.tsx");
export default memoResult;