decord/source/modules/message_request/native/RestrictedMessageRequestPreview.tsx

141 lines
5.1 KiB
TypeScript
Raw Normal View History

2026-08-24 06:08:38 +00:00
// Module ID: 16209
// Function ID: 16210
2026-07-20 16:05:17 +00:00
// Name: RestrictedMessageRequestPreview
2026-08-24 06:08:38 +00:00
// Dependencies: [32, 19, 17, 1391, 4999, 1922, 21, 4668, 712, 1629, 589, 16210, 16212, 11656, 2]
2026-07-20 16:05:17 +00:00
// Exports: default
2026-08-24 06:08:38 +00:00
// Module 16209 (RestrictedMessageRequestPreview)
import ThemesDefault from "Themes" /* 712 */;
import closure_3 from "_slicedToArray" /* 32 */;
import closure_4 from "noop" /* 19 */;
import get_ActivityIndicator from "get ActivityIndicator" /* 17 */;
import closure_7 from "ensureGuildLoaded" /* 1391 */;
import closure_8 from "reinjectEphemerals" /* 4999 */;
import closure_9 from "mergeGuildAvatar" /* 1922 */;
import jsxProd from "jsxProd" /* 21 */;
import createCacheKey from "createCacheKey" /* 4668 */;
2026-07-23 10:11:24 +00:00
const require = arg1;
2026-07-29 08:29:29 +00:00
({ ScrollView: c5, View: closure_6 } = get_ActivityIndicator);
({ jsx: c10, jsxs: unpackModuleId } = jsxProd);
createCacheKey = { container: null, scroll: null, hidden: null, scrollContent: null, footer: null };
2026-08-24 06:08:38 +00:00
createCacheKey = { flex: 1, backgroundColor: ThemesDefault.colors.BACKGROUND_BASE_LOW };
2026-07-29 08:29:29 +00:00
createCacheKey[0] = createCacheKey;
createCacheKey[1] = { flex: 1 };
createCacheKey[2] = { opacity: 0 };
2026-08-24 06:08:38 +00:00
createCacheKey[3] = { paddingHorizontal: ThemesDefault.space.PX_16, paddingTop: ThemesDefault.space.PX_8, paddingBottom: ThemesDefault.space.PX_8 };
let obj1 = { paddingHorizontal: ThemesDefault.space.PX_16, paddingTop: ThemesDefault.space.PX_8, paddingBottom: ThemesDefault.space.PX_8 };
createCacheKey[4] = { paddingHorizontal: ThemesDefault.space.PX_12 };
let closure_12 = createCacheKey.createStyles(createCacheKey);
let obj2 = { paddingHorizontal: ThemesDefault.space.PX_12 };
const result = require("set").fileFinishedImporting("modules/message_request/native/RestrictedMessageRequestPreview.tsx");
2026-07-20 16:05:17 +00:00
export default function RestrictedMessageRequestPreview(channelId) {
channelId = channelId.channelId;
2026-07-29 08:29:29 +00:00
let ref;
2026-08-24 06:08:38 +00:00
dependencyMap = undefined;
2026-07-29 08:29:29 +00:00
let first;
let React;
2026-08-24 06:08:38 +00:00
closure_5 = undefined;
2026-07-20 16:05:17 +00:00
let first1;
2026-08-24 06:08:38 +00:00
const tmp = callback2();
2026-07-29 08:29:29 +00:00
let obj = React;
ref = React.useRef(null);
dependencyMap = React.useRef(false);
const tmp5 = first(React.useState(false), 2);
first = tmp5[0];
React = tmp5[1];
2026-08-24 06:08:38 +00:00
obj1 = channelId(589);
const items = [closure_8];
2026-07-20 16:05:17 +00:00
const items1 = [channelId];
2026-08-24 06:08:38 +00:00
closure_5 = obj1.useStateFromStores(items, () => closure_1_8.getMessages(channelId).length > 0, items1);
2026-07-29 08:29:29 +00:00
let obj2 = channelId(589);
2026-08-24 06:08:38 +00:00
const items2 = [closure_7];
2026-07-20 16:05:17 +00:00
const items3 = [channelId];
2026-08-24 06:08:38 +00:00
const stateFromStores = obj2.useStateFromStores(items2, () => closure_1_7.getChannel(channelId), items3);
2026-07-20 16:05:17 +00:00
first1 = undefined;
2026-07-29 08:29:29 +00:00
if (stateFromStores != null) {
2026-07-20 16:05:17 +00:00
const recipients = stateFromStores.recipients;
2026-07-29 08:29:29 +00:00
if (recipients != null) {
2026-07-20 16:05:17 +00:00
first1 = recipients[0];
}
}
2026-08-24 06:08:38 +00:00
const items4 = [closure_9];
2026-07-20 16:05:17 +00:00
const items5 = [first1];
2026-07-29 08:29:29 +00:00
const stateFromStores1 = channelId(589).useStateFromStores(items4, () => {
2026-07-20 16:05:17 +00:00
let user;
if (null != first1) {
2026-08-24 06:08:38 +00:00
user = closure_1_9.getUser(tmp);
2026-07-20 16:05:17 +00:00
}
return user;
}, items5);
const items6 = [first];
2026-07-29 08:29:29 +00:00
const effect = obj.useEffect(() => {
2026-07-20 16:05:17 +00:00
if (!first) {
const _setTimeout = setTimeout;
2026-07-29 08:29:29 +00:00
const timeout = setTimeout(() => callback(true), 1000);
2026-07-20 16:05:17 +00:00
return () => clearTimeout(closure_0);
}
}, items6);
2026-07-29 08:29:29 +00:00
let tmp13Result = null;
2026-07-20 16:05:17 +00:00
if (null != stateFromStores) {
2026-07-29 08:29:29 +00:00
tmp13Result = null;
2026-07-20 16:05:17 +00:00
if (null != stateFromStores1) {
2026-07-29 08:29:29 +00:00
obj = { style: null, children: null };
obj[0] = tmp.container;
obj = { ref: null, style: null, contentContainerStyle: null, onScrollBeginDrag: null, onContentSizeChange: null, children: null };
obj[0] = ref;
2026-07-20 16:05:17 +00:00
const items7 = [tmp.scroll, ];
let hidden = null;
if (!first) {
hidden = tmp.hidden;
}
items7[1] = hidden;
2026-07-29 08:29:29 +00:00
obj[1] = items7;
obj[2] = tmp.scrollContent;
obj[3] = function onScrollBeginDrag() {
2026-07-20 16:05:17 +00:00
closure_2.current = true;
};
2026-07-29 08:29:29 +00:00
obj[4] = function onContentSizeChange() {
2026-07-20 16:05:17 +00:00
if (!ref.current) {
const current = ref.current;
2026-07-29 08:29:29 +00:00
if (current != null) {
current.scrollToEnd({ animated: false });
2026-07-20 16:05:17 +00:00
}
}
2026-07-29 08:29:29 +00:00
let tmp4 = !first;
if (!first) {
tmp4 = closure_5;
}
2026-07-20 16:05:17 +00:00
if (tmp4) {
const _requestAnimationFrame = requestAnimationFrame;
2026-07-29 08:29:29 +00:00
const animationFrame = requestAnimationFrame(() => callback(true));
2026-07-20 16:05:17 +00:00
}
};
2026-07-29 08:29:29 +00:00
obj1 = { channel: null, user: null };
obj1[0] = stateFromStores;
obj1[1] = stateFromStores1;
2026-08-24 06:08:38 +00:00
const items8 = [callback(tmp2(16210), obj1), ];
2026-07-29 08:29:29 +00:00
obj2 = { channelId: null };
obj2[0] = channelId;
2026-08-24 06:08:38 +00:00
items8[1] = callback(tmp2(16212), obj2);
2026-07-29 08:29:29 +00:00
obj[5] = items8;
2026-07-20 16:05:17 +00:00
const items9 = [closure_11(closure_5, obj), ];
2026-07-29 08:29:29 +00:00
const obj3 = { style: null, children: null };
2026-07-20 16:05:17 +00:00
const items10 = [tmp.footer, ];
2026-07-29 08:29:29 +00:00
const obj4 = { paddingBottom: null };
2026-08-15 05:55:55 +00:00
obj4[0] = tmp2(712).space.PX_8 + ref(1629)().bottom;
2026-07-20 16:05:17 +00:00
items10[1] = obj4;
2026-07-29 08:29:29 +00:00
obj3[0] = items10;
const obj5 = { channel: null };
obj5[0] = stateFromStores;
2026-08-24 06:08:38 +00:00
obj3[1] = callback(tmp2(11656), obj5);
2026-07-23 10:11:24 +00:00
items9[1] = callback(first1, obj3);
2026-07-29 08:29:29 +00:00
obj[1] = items9;
tmp13Result = tmp13(tmp14, obj);
const tmp15 = closure_5;
2026-07-20 16:05:17 +00:00
}
}
2026-07-29 08:29:29 +00:00
return tmp13Result;
2026-07-20 16:05:17 +00:00
};