Skipped 1 file(s) >100MB (GitHub limit): source/__polyfill/04xxx/module_4825.js (118.4 MB)
76 lines
3.4 KiB
TypeScript
76 lines
3.4 KiB
TypeScript
// Module ID: 17236
|
|
// Function ID: 17237
|
|
// Name: shared/DMChannel
|
|
// Dependencies: [19, 4822, 21, 4651, 11070, 4640, 576, 16906, 16504, 15434, 11, 5069, 17228, 5210, 16905, 17229, 10258, 8001, 4793, 2]
|
|
|
|
// Module 17236 (shared/DMChannel)
|
|
import nativeDefault from "native" /* 576 */;
|
|
import transitionToChannel from "transitionToChannel" /* 4651 */;
|
|
import openChannelLongPressActionSheet from "openChannelLongPressActionSheet" /* 11070 */;
|
|
import noop from "module_19" /* 19 */;
|
|
|
|
require = fn;
|
|
const UnreadSetting = fn(4822).UnreadSetting;
|
|
const jsx = fn(21).jsx;
|
|
const createStyles = fn(4640);
|
|
let obj = { pressable: { flex: 1 }, pressableUnderlayColor: { backgroundColor: nativeDefault.colors.INTERACTIVE_BACKGROUND_ACTIVE } };
|
|
let closure_6 = createStyles.createStyles(obj);
|
|
let obj3 = { backgroundColor: nativeDefault.colors.INTERACTIVE_BACKGROUND_ACTIVE };
|
|
const size = fn(2);
|
|
const result = size.fileFinishedImporting("modules/launchpad/native/shared/DMChannel.tsx");
|
|
|
|
export default noop.memo(function DMChannel(navigationReplace) {
|
|
({ channel, muted } = navigationReplace);
|
|
if (muted === undefined) {
|
|
muted = false;
|
|
}
|
|
let flag = navigationReplace.navigationReplace;
|
|
if (flag === undefined) {
|
|
flag = false;
|
|
}
|
|
const tmp = closure_6();
|
|
const tmp4 = flag(16906)();
|
|
const baseChannelUnreadBadgeState = channel(16504).useBaseChannelUnreadBadgeState(channel, muted);
|
|
({ unread, mentionCount } = baseChannelUnreadBadgeState);
|
|
const tmp7 = flag(15434)(channel, { unread });
|
|
let extractTimestampResult;
|
|
if (null != tmp7) {
|
|
extractTimestampResult = tmp2(11).extractTimestamp(tmp7.id);
|
|
const tmp2Result = tmp2(11);
|
|
}
|
|
let str = "text-muted";
|
|
if (unread) {
|
|
str = "text-muted";
|
|
if (!muted) {
|
|
str = "text-default";
|
|
}
|
|
}
|
|
const obj = channel(16504);
|
|
const fontScale = channel(5069).useFontScale();
|
|
const tmp5Result = channel(5069);
|
|
const obj2 = { style: null, underlayColor: tmp.pressableUnderlayColor.backgroundColor };
|
|
const items = [tmp.pressable, { borderRadius: tmp4.container.borderRadius }];
|
|
obj2.style = items;
|
|
const obj3 = { onPress: null, onLongPress: null };
|
|
const items1 = [channel.id, flag];
|
|
obj3.onPress = noop.useCallback(() => {
|
|
transitionToChannel.transitionToChannel(channel.id, { navigationReplace: flag });
|
|
}, items1);
|
|
const items2 = [channel.id];
|
|
obj3.onLongPress = noop.useCallback(() => openChannelLongPressActionSheet.openChannelLongPressActionSheet(channel.id), items2);
|
|
const merged = Object.assign(obj3);
|
|
const obj4 = { channel, unread, resolvedUnreadSetting: UnreadSetting.ALL_MESSAGES, muted, mentionCount, unreadBadge: null, subtitle: null, latestMessageTimestamp: null, channelName: null, fontScale: null };
|
|
const tmp2Result3 = flag(17228);
|
|
obj4.unreadBadge = jsx(flag(17229), { unread, resolvedUnreadSetting: UnreadSetting.ALL_MESSAGES, muted });
|
|
let tmp11Result = null != tmp7;
|
|
if (tmp11Result) {
|
|
const obj6 = { channel, message: tmp7, color: str, muted, layout: tmp5(8001).ChannelListLayoutTypes.COMPACT };
|
|
tmp11Result = tmp11(tmp5(10258).ChannelRowPreview, obj6);
|
|
}
|
|
obj4.subtitle = tmp11Result;
|
|
obj4.latestMessageTimestamp = extractTimestampResult;
|
|
obj4.channelName = flag(4793)(channel);
|
|
obj4.fontScale = fontScale;
|
|
obj2.children = flag(16905)(obj4);
|
|
return tmp2Result3(jsx(channel(5210).PressableHighlight, { style: null, underlayColor: tmp.pressableUnderlayColor.backgroundColor }));
|
|
});
|