147 lines
9.4 KiB
TypeScript
147 lines
9.4 KiB
TypeScript
/* Metro module 15257; source: modules/message_request/native/RestrictedMessagePreviewHeader.tsx; dependencies: [31, 27, 11899, 33, 4501, 697, 6771, 3995, 8743, 6797, 3856, 4080, 8822, 1962, 8515, 6947, 5080, 5278, 1244, 1305, 4573, 15239, 6819, 15258, 2] */
|
|
import Native from '../../../external/discord_common/js/packages/tokens/native.tsx'; /* Metro dependency 697 */
|
|
import UserUtils from '../../../utils/UserUtils.tsx'; /* Metro dependency 3995 */
|
|
import ActionSheetActionCreators from '../../action_sheet/native/ActionSheetActionCreators.tsx'; /* Metro dependency 4080 */
|
|
import ModalActionCreators from '../../../actions/ModalActionCreators.tsx'; /* Metro dependency 5080 */
|
|
import UseAnalyticsLocations from '../../app_analytics/useAnalyticsLocations.tsx'; /* Metro dependency 6771 */
|
|
import ShowUserProfileActionSheet from '../../user_profile/native/showUserProfileActionSheet.tsx'; /* Metro dependency 8743 */
|
|
import MessageRequestMutualServers from './MessageRequestMutualServers.tsx'; /* Metro dependency 15239 */
|
|
import * as FileImportTrackerModule from '../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
|
|
import * as ReactNativeModule from '../../../by-id/module-00027-ReactNative.js'; /* Metro dependency 27 */
|
|
import * as ReactModule from '../../../by-id/module-00031-React.js'; /* Metro dependency 31 */
|
|
import * as JsxRuntimeModule from '../../../by-id/module-00033-JsxRuntime.js'; /* Metro dependency 33 */
|
|
import * as NativeModule from '../../../design/void/native.tsx'; /* Metro dependency 1305 */
|
|
import * as ToastUtilsModule from '../../toast/native/ToastUtils.tsx'; /* Metro dependency 3856 */
|
|
import * as TextModule from '../../../design/components/Text/native/Text.tsx'; /* Metro dependency 4573 */
|
|
import * as PressablesModule from '../../../design/void/Pressables/native/Pressables.tsx'; /* Metro dependency 5278 */
|
|
import * as ClipboardUtilsNativeModule from '../../../utils/ClipboardUtils.native.tsx'; /* Metro dependency 6797 */
|
|
import * as GuildIconModule from '../../guild/native/GuildIcon.tsx'; /* Metro dependency 6819 */
|
|
import * as TransitionToGuildNativeModule from '../../routing/transitionToGuild.native.tsx'; /* Metro dependency 6947 */
|
|
import * as UserProfileAnalyticsUtilsModule from '../../user_profile/UserProfileAnalyticsUtils.tsx'; /* Metro dependency 8515 */
|
|
import * as MessageRequestConstantsModule from '../MessageRequestConstants.tsx'; /* Metro dependency 11899 */
|
|
|
|
function _fun116658(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#116658, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15454:6, offset: 0x02491af3, size: 320 bytes, params: 8, frame: 22
|
|
const env0_0 = require;
|
|
const Object = global.Object;
|
|
Object.defineProperty(exports, '__esModule', {value: true});
|
|
let value = JsxRuntimeModule;
|
|
const env0_6 = value.jsx;
|
|
const env0_7 = value.jsxs;
|
|
value = require(4501) /* metro dependency 4501: createStyles */;
|
|
const createStyles = value.createStyles;
|
|
object = {};
|
|
const object2 = {alignItems: 'flex-start'};
|
|
const PX_8 = (Native).space.PX_8;
|
|
object2.gap = PX_8;
|
|
const PX_12 = (Native).space.PX_12;
|
|
object2.paddingVertical = PX_12;
|
|
object.container = object2;
|
|
const PX_4 = (Native).space.PX_4;
|
|
object.avatar = {marginBottom: PX_4};
|
|
const env0_8 = Reflect.apply(createStyles, value, [object]);
|
|
(FileImportTrackerModule).fileFinishedImporting('modules/message_request/native/RestrictedMessagePreviewHeader.tsx');
|
|
exports.default = RestrictedMessagePreviewHeader;
|
|
function RestrictedMessagePreviewHeader({channel, user}) { // fn#116659, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15454:464, offset: 0x02491c33, size: 957 bytes, params: 2, frame: 33
|
|
const styles = useStyles();
|
|
const analyticsLocations = (UseAnalyticsLocations)().analyticsLocations;
|
|
const name = (UserUtils).getName(user);
|
|
const userTag = (UserUtils).getUserTag(user,
|
|
{'decoration': 'never', 'identifiable': 'always'});
|
|
const binding = userTag;
|
|
const useCallback = binding.useCallback;
|
|
let id = user.id;
|
|
const value4 = Reflect.apply(useCallback, binding, [_fun116660, [id, channel.id, analyticsLocations]]);
|
|
const value5 = binding.useCallback(_fun116661, [userTag]);
|
|
const value6 = binding.useCallback(_fun116662, [user]);
|
|
const PressableOpacity = (PressablesModule).PressableOpacity;
|
|
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
|
|
let string = intl.string;
|
|
let iXAna6 = (require(1244) /* metro dependency 1244: indexNative */).t.iXAna6;
|
|
const Avatar = (NativeModule).Avatar;
|
|
const guild_id = channel.guild_id;
|
|
const AvatarSizes = (NativeModule).AvatarSizes;
|
|
const XXLARGE = AvatarSizes.XXLARGE;
|
|
const items2 = [
|
|
<PressableOpacity
|
|
accessibilityRole="button"
|
|
accessibilityLabel={Reflect.apply(string, intl, [iXAna6])}
|
|
onPress={value4}
|
|
>
|
|
<Avatar
|
|
style={styles.avatar}
|
|
user={user}
|
|
guildId={guild_id}
|
|
size={XXLARGE}
|
|
avatarDecoration={user.avatarDecoration}
|
|
/>
|
|
</PressableOpacity>,
|
|
];
|
|
string = intl.string;
|
|
iXAna6 = (require(1244) /* metro dependency 1244: indexNative */).t.iXAna6;
|
|
const Text = (TextModule).Text;
|
|
items2[1] = (
|
|
<PressableOpacity
|
|
accessibilityRole="button"
|
|
accessibilityLabel={Reflect.apply(string, intl, [iXAna6])}
|
|
onPress={value4}
|
|
>
|
|
<Text variant="heading-xxl/extrabold" color="mobile-text-heading-primary">
|
|
{name}
|
|
</Text>
|
|
</PressableOpacity>
|
|
);
|
|
items2[2] = !user.isProvisional && <PressableOpacity accessibilityRole="button" accessibilityHint={intl.string((require(1244) /* metro dependency 1244: indexNative */).t.y5MwJy)} onPress={value5}><Text variant="heading-lg/medium" color="text-default">{userTag}</Text></PressableOpacity>;
|
|
items2[3] = (
|
|
<Text variant="text-md/medium" color="text-default">
|
|
{intl.formatToPlainString((require(1244) /* metro dependency 1244: indexNative */).t['Qvg+6+'],
|
|
{username: name})}
|
|
</Text>
|
|
);
|
|
id = user.id;
|
|
const GuildIconSizes = (GuildIconModule).GuildIconSizes;
|
|
const XSMALL = GuildIconSizes.XSMALL;
|
|
items2[4] = ((Component) => <Component userId={id} onPress={value6} iconSize={XSMALL} textVariant="text-md/medium" />)(MessageRequestMutualServers);
|
|
items2[5] = ((Component) => <Component channel={channel} user={user} />)(importDefault(15258) /* metro dependency 15258: RestrictedMessagePreviewActions */);
|
|
return (
|
|
<View style={styles.container}>
|
|
{items2}
|
|
</View>
|
|
);
|
|
function _fun116660() { // fn#116660, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15454:670, offset: 0x02491ff0, size: 72 bytes, params: 1, frame: 13
|
|
const value = environment.__proto__;
|
|
(ShowUserProfileActionSheet)({userId: user.id,
|
|
channelId: channel.id, sourceAnalyticsLocations: analyticsLocations});
|
|
}
|
|
|
|
function _fun116661() { // fn#116661, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15454:774, offset: 0x02492038, size: 67 bytes, params: 1, frame: 14
|
|
const value = environment.__proto__;
|
|
(ClipboardUtilsNativeModule).copy(ReactModule);
|
|
(ToastUtilsModule).presentUsernameCopied();
|
|
}
|
|
|
|
function _fun116662() { // fn#116662, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15454:852, offset: 0x0249207b, size: 107 bytes, params: 1, frame: 16
|
|
var environment;
|
|
let value = environment.__proto__;
|
|
const defaultImport = importDefault(dependencyMap[11]);
|
|
const openLazy = defaultImport.openLazy;
|
|
value = require(dependencyMap[13]);
|
|
value = value(dependencyMap[12], dependencyMap.paths);
|
|
Reflect.apply(openLazy, defaultImport, [value, 'MutualGuildsActionSheet', {user: user,
|
|
onPressMutualGuild: onPressMutualGuild_116663}]);
|
|
function onPressMutualGuild_116663(a0) { // fn#116663, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15454:952, offset: 0x024920e6, size: 129 bytes, params: 2, frame: 16
|
|
(UserProfileAnalyticsUtilsModule).trackUserProfileAction({action: 'PRESS_MUTUAL_GUILD'});
|
|
(TransitionToGuildNativeModule).transitionToGuild(a0);
|
|
(ActionSheetActionCreators).hideActionSheet();
|
|
(ModalActionCreators).popWithKey(MOBILE_MESSAGE_REQUESTS_MODAL_KEY);
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
global.__d(_fun116658, 15257, [31, 27, 11899, 33, 4501, 697, 6771, 3995, 8743, 6797, 3856, 4080, 8822, 1962, 8515,
|
|
6947, 5080, 5278, 1244, 1305, 4573, 15239, 6819, 15258,
|
|
2]) /* metro module 15257, dependencies: [31, 27, 11899, 33, 4501, 697, 6771, 3995, 8743, 6797, 3856, 4080, 8822, 1962, 8515, 6947, 5080, 5278, 1244, 1305, 4573, 15239, 6819, 15258, 2] */;
|