Files
discord-decomp/sources/modules/user_profile/native/UserProfileOverflowMenu.tsx
T
2026-07-27 16:20:00 +03:00

573 lines
33 KiB
TypeScript

/* Metro module 10475; source: modules/user_profile/native/UserProfileOverflowMenu.tsx; dependencies: [57, 31, 4606, 1379, 3793, 1934, 661, 4299, 8781, 33, 566, 10476, 10482, 8782, 8514, 6771, 6789, 8490, 8917, 4619, 6796, 8742, 480, 8743, 1244, 4603, 4080, 5080, 10483, 1962, 8783, 8793, 6264, 8794, 8153, 477, 8796, 683, 8916, 7709, 3829, 6797, 3995, 3856, 6803, 8810, 8811, 8341, 8638, 697, 2] */
function _fun81047(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#81047, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10661:6, offset: 0x01e97422, size: 338 bytes, params: 8, frame: 19
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_3 = importDefault(57) /* metro dependency 57 */;
const env0_4 = importAll(31) /* metro dependency 31 */;
const channelRTCStore = importDefault(4606) /* metro dependency 4606: ChannelRTCStore */;
const channelStore = importDefault(1379) /* metro dependency 1379: ChannelStore */;
const relationshipStore = importDefault(3793) /* metro dependency 3793: RelationshipStore */;
const selectedChannelStore = importDefault(1934) /* metro dependency 1934: SelectedChannelStore */;
let value = require(661) /* metro dependency 661: Constants */;
const env0_9 = value.AnalyticEvents;
const env0_10 = value.AVATAR_MAX_SIZE;
const env0_11 = value.ChannelTypesSets;
const env0_12 = value.NOOP;
const env0_13 = value.RelationshipTypes;
const env0_14 = (require(4299) /* metro dependency 4299: CallConstants */).ParticipantTypes;
value = require(8781) /* metro dependency 8781: RestrictionConfirmationConstants */;
const env0_15 = value.BLOCK_CONFIRMATION_ACTION_SHEET_KEY;
const env0_16 = value.IGNORE_CONFIRMATION_ACTION_SHEET_KEY;
const env0_17 = (require(33) /* metro dependency 33 */).jsx;
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/user_profile/native/UserProfileOverflowMenu.tsx');
exports.default = UserProfileOverflowMenu;
}
function UserProfileOverflowMenu({user, currentUser, displayProfile, channel}) { // fn#81048, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10661:489, offset: 0x01e97574, size: 2811 bytes, params: 2, frame: 42
var r18;
var r22;
var push;
var object2;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
var string;
const t = (require(1244) /* metro dependency 1244: indexNative */).t;
var object3;
var recipients;
var object4;
var object8;
var object16;
var object20;
var moduleValue8;
var object21;
var object22;
var object23;
var object24;
var object25;
var object26;
var object27;
const {relationshipType,
isIgnored} = (require(566) /* metro dependency 566: flux */).useStateFromStoresObject([RelationshipStore],
function() {
var object = {};
var userBinding = user;
object.relationshipType = RelationshipStore.getRelationshipType(userBinding.id);
object.isIgnored = RelationshipStore.isIgnored(userBinding.id);
return object;
});
const value4 = (require(566) /* metro dependency 566: flux */).useStateFromStoresObject([SelectedChannelStore,
ChannelStore], function() {
var object = {};
object.selectedChannel = ChannelStore.getChannel(SelectedChannelStore.getChannelId());
object.selectedVoiceChannelId = SelectedChannelStore.getVoiceChannelId();
object.selectedVoiceChannel = ChannelStore.getChannel(SelectedChannelStore.getVoiceChannelId());
return object;
});
const selectedChannel = value4.selectedChannel;
const env0_3 = selectedChannel;
const selectedVoiceChannelId = value4.selectedVoiceChannelId;
const env0_4 = selectedVoiceChannelId;
const selectedVoiceChannel = value4.selectedVoiceChannel;
const guildInviteUtilsModule = require(10476) /* metro dependency 10476: GuildInviteUtils */;
const useServerInviteRows = guildInviteUtilsModule.useServerInviteRows;
let id = user.id;
const value6 = env0_3(Reflect.apply(useServerInviteRows, guildInviteUtilsModule, [id]), 2);
const property = value6[0];
const property2 = value6[1];
const value9 = RelationshipStore.getNickname(user.id) != null;
const r12 = (importDefault(10482) /* metro dependency 10482: useCanDM */)(user.id) && property.length + property2.length > 0;
const isIarUserReportingEnabled2 = (require(8782) /* metro dependency 8782: SafetyExperienceIarUserReportingExperiment */).isIarUserReportingEnabled('User Profile Options - Mobile');
const value12 = (require(8514) /* metro dependency 8514: UserProfileAnalyticsContext */).useUserProfileAnalyticsContext();
const context = value12.context;
const env0_7 = value12.trackUserProfileAction;
const defaultImport2 = importDefault(6771) /* metro dependency 6771: useAnalyticsLocations */;
const USER_PROFILE_OVERFLOW_MENU = (importDefault(6789) /* metro dependency 6789: AnalyticsLocation */).USER_PROFILE_OVERFLOW_MENU;
const value13 = defaultImport2(USER_PROFILE_OVERFLOW_MENU);
const analyticsLocations = value13.analyticsLocations;
const env0_9 = value13.newestAnalyticsLocation;
const value14 = (importDefault(8490) /* metro dependency 8490: useDisplayProfile */)(user.id, channel?.guild_id);
const value15 = (require(8917) /* metro dependency 8917: useCanRing */).useCanRing(user, 'UserProfileOverflowMenu',
selectedVoiceChannelId);
const defaultImport4 = importDefault(4619) /* metro dependency 4619: GuildVoiceRingingExperiment */;
let useExperiment = defaultImport4.useExperiment;
const enabled = Reflect.apply(useExperiment, defaultImport4, [{guildId: selectedVoiceChannel?.guild_id,
location: 'UserProfileOverflowMenu'}]).enabled;
const defaultImport5 = importDefault(6796) /* metro dependency 6796: TidaWebformExperiment */;
useExperiment = defaultImport5.useExperiment;
const tidaWebformEnabled = Reflect.apply(useExperiment, defaultImport5, [{location: 'UserProfileOverflowMenu'},
{autoTrackExposure: false}]).tidaWebformEnabled;
const value16 = (require(566) /* metro dependency 566: flux */).useStateFromStoresObject([ChannelRTCStore],
_fun81051);
const userIsInCall = value16.userIsInCall;
const r11 = value15 && selectedVoiceChannelId != null && (userIsInCall ? value16.isUserRinging : !userIsInCall);
const defaultImport6 = importDefault(8742) /* metro dependency 8742: useTrackImpression */;
object = {};
const ImpressionTypes = (require(480) /* metro dependency 480: AnalyticsUtils */).ImpressionTypes;
const MENU = ImpressionTypes.MENU;
object.type = MENU;
const ImpressionNames = (require(480) /* metro dependency 480: AnalyticsUtils */).ImpressionNames;
const RING_TO_GUILD_VC_MENU_ITEM_SHOWN = ImpressionNames.RING_TO_GUILD_VC_MENU_ITEM_SHOWN;
object.name = RING_TO_GUILD_VC_MENU_ITEM_SHOWN;
object.properties = {voice_channel_id: selectedVoiceChannelId, voice_guild_id: selectedVoiceChannel?.guild_id};
defaultImport6(object, {disableTrack: !(enabled && r11)}, [user.id]);
const env0_13 = env0_4.useCallback(_fun81052, [user.id, channel?.id, context, analyticsLocations]);
object = [];
const items2 = [];
id = user.id;
const id2 = currentUser.id;
const env0_15 = channel?.getGuildId();
const BLOCKED = RelationshipTypes.BLOCKED;
const value20 = relationshipType === BLOCKED;
if (displayProfile?.guildId != null && (displayProfile == null || !displayProfile.private)) {
push = object.push;
object2 = {};
object2.label = intl.string((require(1244) /* metro dependency 1244: indexNative */).t.GISTta);
object2.action = action_81053;
Reflect.apply(push, object, [object2]);
}
if (value14?.guildId != null && displayProfile?.guildId == null) {
push = object.push;
object3 = {};
object3.label = intl.string((require(1244) /* metro dependency 1244: indexNative */).t.DisZzB);
object3.action = action_81054;
Reflect.apply(push, object, [object3]);
}
if (id2 !== id) {
r18 = channel != null && !channel.isThread();
r18 = r18 && channel.isOwner(currentUser.id);
if (r18) {
recipients = channel.recipients;
r18 = recipients != null;
r22 = recipients;
} else {
r22 = undefined;
}
r18 = r18 && r22.includes(id);
if (r18) {
push = items2.push;
object4 = {};
object4.label = intl.string((require(1244) /* metro dependency 1244: indexNative */).t['n5zMI+']);
object4.variant = 'destructive';
object4.action = action_81055;
Reflect.apply(push, items2, [object4]);
}
if (relationshipType === RelationshipTypes.FRIEND) {
push = object.push;
string = intl.string;
Reflect.apply(push, object, [{label: value9 ? Reflect.apply(string, intl,
[t['8pOYUE']]) : Reflect.apply(string,
intl, [t.BGYkaH]), action: action_81056}]);
}
if (isIgnored) {
if (value20) {
if (!value20) {
push = items2.push;
object16 = {};
object16.label = intl.string((require(1244) /* metro dependency 1244: indexNative */).t.ytCpKs);
object16.action = action_81058;
Reflect.apply(push, items2, [object16]);
}
} else {
push = items2.push;
object8 = {};
object8.label = intl.string((require(1244) /* metro dependency 1244: indexNative */).t['8wXU9B']);
object8.action = action_81057;
Reflect.apply(push, items2, [object8]);
}
} else if (!value20) {
push = items2.push;
object16 = {};
object16.label = intl.string((require(1244) /* metro dependency 1244: indexNative */).t.ytCpKs);
object16.action = action_81058;
Reflect.apply(push, items2, [object16]);
}
push = items2.push;
if (value20) {
object24 = {};
object24.label = intl.string((require(1244) /* metro dependency 1244: indexNative */).t.XyHpKH);
object24.action = action_81059;
Reflect.apply(push, items2, [object24]);
} else {
object20 = {};
object20.label = intl.string((require(1244) /* metro dependency 1244: indexNative */).t.l4Emac);
object20.variant = 'destructive';
object20.action = action_81060;
Reflect.apply(push, items2, [object20]);
if (isIarUserReportingEnabled2) {
push = items2.push;
object22 = {};
object22.label = intl.string((require(1244) /* metro dependency 1244: indexNative */).t.wqHXNt);
object22.variant = 'destructive';
object22.action = action_81062;
Reflect.apply(push, items2, [object22]);
} else {
moduleValue8 = require(477) /* metro dependency 477: PlatformUtils */;
if (moduleValue8.isAndroid()) {
push = items2.push;
object21 = {};
object21.label = intl.string((require(1244) /* metro dependency 1244: indexNative */).t.TbHyMG);
object21.variant = 'destructive';
object21.action = function() {
trackUserProfileAction({action: 'REPORT', analyticsLocations: analyticsLocations});
require(dependencyMap[36]).alertUserReported();
var defaultImport = importDefault(dependencyMap[37]);
var TNS_USER_REPORT_SUBMITTED = AnalyticEvents.TNS_USER_REPORT_SUBMITTED;
defaultImport.track(TNS_USER_REPORT_SUBMITTED, {reported_user_id: id});
};
Reflect.apply(push, items2, [object21]);
}
}
if (r12) {
push = object.push;
object23 = {};
object23.label = intl.string((require(1244) /* metro dependency 1244: indexNative */).t.Sd8Ixw);
object23.action = action_81064;
Reflect.apply(push, object, [object23]);
}
}
}
if (r11) {
push = object.push;
string = intl.string;
Reflect.apply(push, object, [{label: userIsInCall ? Reflect.apply(string, intl,
[t.ygslb0]) : Reflect.apply(string,
intl, [t.bHa9kN]), action: action_81065}]);
}
const DeveloperMode = (require(3829) /* metro dependency 3829: UserSettings */).DeveloperMode;
const setting = DeveloperMode.getSetting();
if (!setting || !tidaWebformEnabled) {
push = object.push;
object25 = {};
object25.label = intl.string((require(1244) /* metro dependency 1244: indexNative */).t.y5MwJy);
object25.action = action_81066;
Reflect.apply(push, object, [object25]);
}
if (setting) {
push = object.push;
object26 = {};
string = intl.string;
if (tidaWebformEnabled) {
object26.label = Reflect.apply(string, intl, [t.QvQeLv]);
object26.action = action_81067;
Reflect.apply(push, object, [object26]);
} else {
object26.label = Reflect.apply(string, intl, [t['/AXYnE']]);
object26.action = action_81072;
Reflect.apply(push, object, [object26]);
}
}
if (channel != null && selectedChannel != null && ChannelTypesSets.TEXTUAL.has(selectedChannel.type)) {
push = object.push;
object27 = {};
object27.label = intl.string((require(1244) /* metro dependency 1244: indexNative */).t.PHjkRE);
object27.action = action_81073;
Reflect.apply(push, object, [object27]);
}
if (object.length !== 0) {
const AnalyticsLocationProvider = (require(6771) /* metro dependency 6771: useAnalyticsLocations */).AnalyticsLocationProvider;
return (
<AnalyticsLocationProvider value={analyticsLocations}>
{((ContextMenu) => <ContextMenu items={[object,
items2]}>{children_81074}</ContextMenu>)((require(8811) /* metro dependency 8811: ContextMenuNative */).ContextMenu)}
</AnalyticsLocationProvider>
);
} else if (items2.length === 0) {
return null;
} else {
const AnalyticsLocationProvider2 = (require(6771) /* metro dependency 6771: useAnalyticsLocations */).AnalyticsLocationProvider;
return (
<AnalyticsLocationProvider2 value={analyticsLocations}>
{((ContextMenu) => <ContextMenu items={[object,
items2]}>{children_81074}</ContextMenu>)((require(8811) /* metro dependency 8811: ContextMenuNative */).ContextMenu)}
</AnalyticsLocationProvider2>
);
}
}
function _fun81051() { // fn#81051, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10661:1735, offset: 0x01e980fb, size: 115 bytes, params: 1, frame: 15
var r1;
var type;
const r3 = env0_10 && selectedVoiceChannelId != null;
const value3 = null;
const r2 = r3 ? ChannelRTCStore.getParticipant(selectedVoiceChannelId, user.id) : value3;
let value = value3 != r2;
if (value) {
type = r2.type;
value = environment.__proto__;
value = type === ParticipantTypes.USER;
r1 = value;
} else {
r1 = value;
}
r1 = r1 && r2.ringing;
return {userIsInCall: value3 != r2, isUserRinging: r1};
}
function _fun81052(a0) { // fn#81052, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10661:2170, offset: 0x01e9816e, size: 135 bytes, params: 2, frame: 15
let value = environment.__proto__;
value = undefined;
const defaultImport = importDefault(8743) /* metro dependency 8743: showUserProfileActionSheet */;
const object2 = {};
copyDataProperties(object2, context, undefined);
object2['showGuildProfile'] = a0;
object2['userId'] = user.id;
object2['channelId'] = channel == null ? value : channel.id;
object2['sourceAnalyticsLocations'] = analyticsLocations;
object2['ignoreBlockedSpeedBump'] = true;
defaultImport(object2);
return value;
}
function UserProfileOverflowMenuAction() { // fn#81053, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10661:2538, owner: UserProfileOverflowMenu.action, offset: 0x01e981f5, size: 48 bytes, params: 1, frame: 12
trackUserProfileAction({action: 'PRESS_VIEW_MAIN_PROFILE', analyticsLocations: analyticsLocations});
env0_13(false);
}
function UserProfileOverflowMenuAction_81054() { // fn#81054, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10661:2742, owner: UserProfileOverflowMenu.action, offset: 0x01e98225, size: 45 bytes, params: 1, frame: 12
trackUserProfileAction({action: 'PRESS_VIEW_SERVER_PROFILE', analyticsLocations: analyticsLocations});
env0_13();
}
function UserProfileOverflowMenuAction_81055() { // fn#81055, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10661:2991, owner: UserProfileOverflowMenu.action, offset: 0x01e98252, size: 77 bytes, params: 1, frame: 16
let value = environment.__proto__;
value = importDefault(4603) /* metro dependency 4603: ChannelActionCreators */;
value.removeRecipient(channel.id, id);
(importDefault(4080) /* metro dependency 4080: ActionSheetActionCreators */).hideActionSheet();
}
function UserProfileOverflowMenuAction_81056() { // fn#81056, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10661:3181, owner: UserProfileOverflowMenu.action, offset: 0x01e9829f, size: 147 bytes, params: 1, frame: 18
trackUserProfileAction({action: 'PRESS_SET_FRIEND_NICKNAME', analyticsLocations: analyticsLocations});
const defaultImport = importDefault(dependencyMap[27]);
defaultImport.pushLazy(require(dependencyMap[29])(dependencyMap[28], dependencyMap.paths), {userId: id,
showUserProfile: env0_13});
importDefault(dependencyMap[26]).hideActionSheet();
}
function UserProfileOverflowMenuAction_81057() { // fn#81057, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10661:3423, owner: UserProfileOverflowMenu.action, offset: 0x01e98332, size: 113 bytes, params: 1, frame: 18
const trackUserProfileActionBinding = trackUserProfileAction;
const value2 = undefined;
trackUserProfileActionBinding({action: 'UNIGNORE', analyticsLocations: analyticsLocations});
const defaultImport = importDefault(8783) /* metro dependency 8783: RelationshipActionCreators */;
defaultImport.unignoreUser(id, newestAnalyticsLocation, channel == null ? value2 : channel.id);
env0_13();
return value2;
}
function UserProfileOverflowMenuAction_81058() { // fn#81058, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10661:3594, owner: UserProfileOverflowMenu.action, offset: 0x01e983a3, size: 206 bytes, params: 1, frame: 21
var object2;
const trackUserProfileActionBinding = trackUserProfileAction;
const value2 = undefined;
trackUserProfileActionBinding({action: 'IGNORE', analyticsLocations: analyticsLocations});
const defaultImport = importDefault(dependencyMap[26]);
const openLazy = defaultImport.openLazy;
const value4 = require(dependencyMap[29])(dependencyMap[31], dependencyMap.paths);
object2 = {};
object2.userId = id;
object2.channelId = channel == null ? value2 : channel.id;
object2.onSuccess = NOOP;
const ImpressionNames = require(dependencyMap[22]).ImpressionNames;
const IGNORE_USER_CONFIRMATION = ImpressionNames.IGNORE_USER_CONFIRMATION;
object2.impressionName = IGNORE_USER_CONFIRMATION;
Reflect.apply(openLazy, defaultImport, [value4, IGNORE_CONFIRMATION_ACTION_SHEET_KEY, object2, 'stack']);
return value2;
}
function UserProfileOverflowMenuAction_81059() { // fn#81059, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10661:3881, owner: UserProfileOverflowMenu.action, offset: 0x01e98471, size: 144 bytes, params: 1, frame: 18
const trackUserProfileActionBinding = trackUserProfileAction;
const value2 = undefined;
trackUserProfileActionBinding({action: 'UNBLOCK', analyticsLocations: analyticsLocations});
const defaultImport = importDefault(8783) /* metro dependency 8783: RelationshipActionCreators */;
defaultImport.unblockUser(id, {location: newestAnalyticsLocation});
env0_13();
const defaultImport2 = importDefault(6264) /* metro dependency 6264: SafetyToastsActionCreatorsNative */;
defaultImport2.showUnblockSuccessToast(id, channel == null ? value2 : channel.id);
return value2;
}
function UserProfileOverflowMenuAction_81060() { // fn#81060, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10661:4117, owner: UserProfileOverflowMenu.action, offset: 0x01e98501, size: 183 bytes, params: 1, frame: 21
const value2 = undefined;
const defaultImport = importDefault(dependencyMap[26]);
const openLazy = defaultImport.openLazy;
const value3 = require(dependencyMap[29])(dependencyMap[33], dependencyMap.paths);
const object2 = {};
object2.userId = id;
object2.channelId = channel == null ? value2 : channel.id;
object2.onSuccess = onSuccess_81061;
const ImpressionNames = require(dependencyMap[22]).ImpressionNames;
const BLOCK_USER_CONFIRMATION = ImpressionNames.BLOCK_USER_CONFIRMATION;
object2.impressionName = BLOCK_USER_CONFIRMATION;
Reflect.apply(openLazy, defaultImport, [value3, BLOCK_CONFIRMATION_ACTION_SHEET_KEY, object2, 'stack']);
return value2;
}
function UserProfileOverflowMenuAction_81062() { // fn#81062, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10661:4441, owner: UserProfileOverflowMenu.action, offset: 0x01e985fe, size: 132 bytes, params: 1, frame: 16
const trackUserProfileActionBinding = trackUserProfileAction;
const value2 = undefined;
trackUserProfileActionBinding({action: 'REPORT', analyticsLocations: analyticsLocations});
const r6 = env0_15 === '@me' || env0_15 === null ? value2 : env0_15;
const reportModalsModule = require(8153) /* metro dependency 8153: ReportModals */;
reportModalsModule.showReportModalForUser(user, r6);
(importDefault(4080) /* metro dependency 4080: ActionSheetActionCreators */).hideActionSheet();
return value2;
}
function UserProfileOverflowMenuAction_81064() { // fn#81064, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10661:4909, owner: UserProfileOverflowMenu.action, offset: 0x01e986f6, size: 80 bytes, params: 1, frame: 14
trackUserProfileAction({action: 'PRESS_INVITE_TO_SERVER', analyticsLocations: analyticsLocations});
const guildInviteUtilsModule = require(10476) /* metro dependency 10476: GuildInviteUtils */;
guildInviteUtilsModule.showGuildInviteActionSheet(id, newestAnalyticsLocation);
}
function UserProfileOverflowMenuAction_81065() { // fn#81065, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10661:5126, owner: UserProfileOverflowMenu.action, offset: 0x01e98746, size: 239 bytes, params: 1, frame: 18
var moduleValue;
trackUserProfileAction({action: userIsInCall ? 'STOP_RINGING' : 'RING', analyticsLocations: analyticsLocations});
userIsInCallBinding = userIsInCall;
const defaultImport = importDefault(8916) /* metro dependency 8916: CallActionCreators */;
if (userIsInCallBinding) {
defaultImport.stopRinging(selectedVoiceChannelId, [user.id]);
} else {
defaultImport.ring(selectedVoiceChannelId, [user.id], 'user_profile_overflow_menu');
if (enabled && selectedVoiceChannel != null) {
(importDefault(4080) /* metro dependency 4080: ActionSheetActionCreators */).hideActionSheet();
moduleValue = require(7709) /* metro dependency 7709: PrivateChannelCallUtils */;
moduleValue.openChannelCallModal(selectedVoiceChannel);
}
}
}
function UserProfileOverflowMenuAction_81066() { // fn#81066, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10661:5472, owner: UserProfileOverflowMenu.action, offset: 0x01e98835, size: 139 bytes, params: 1, frame: 18
trackUserProfileAction({action: 'COPY_USERNAME', analyticsLocations: analyticsLocations});
const clipboardUtilsNativeModule = require(6797) /* metro dependency 6797: ClipboardUtilsNative */;
const copy = clipboardUtilsNativeModule.copy;
const defaultImport = importDefault(3995) /* metro dependency 3995: UserUtils */;
const getUserTag = defaultImport.getUserTag;
Reflect.apply(copy, clipboardUtilsNativeModule, [Reflect.apply(getUserTag, defaultImport, [user,
{'decoration': 'never', 'identifiable': 'always'}])]);
(require(3856) /* metro dependency 3856: ToastUtils */).presentUsernameCopied();
}
function UserProfileOverflowMenuAction_81067() { // fn#81067, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10661:5712, owner: UserProfileOverflowMenu.action, offset: 0x01e988c0, size: 548 bytes, params: 1, frame: 21
var environment;
var getBannerURL;
var object2;
const items = [];
let push = items.push;
let value = environment.__proto__;
const value2 = undefined;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
let string = intl.string;
const t = (require(1244) /* metro dependency 1244: indexNative */).t;
Reflect.apply(push, items, [{label: Reflect.apply(string, intl, [t.y5MwJy]), onPress: onPress_81068}]);
push = items.push;
const object4 = {};
object4.label = intl.string(t['/AXYnE']);
object4.onPress = onPress_81069;
Reflect.apply(push, items, [object4]);
if (user.avatar != null || user.hasAvatarForGuild(displayProfile == null ? value2 : displayProfile.guildId)) {
items.push({label: intl.string(t.gERDvM), onPress: onPress_81070});
}
let displayProfileBinding = displayProfile;
if (displayProfileBinding != null) {
displayProfileBinding = displayProfile;
getBannerURL = displayProfileBinding.getBannerURL;
object2 = {canAnimate: true};
object2.size = AVATAR_MAX_SIZE;
if (Reflect.apply(getBannerURL, displayProfileBinding, [object2]) != null) {
items.push({label: intl.string(t.hsNv0R), onPress: onPress_81071});
}
}
value = require(6803) /* metro dependency 6803: showSimpleActionSheetNative */;
const showSimpleActionSheet = value.showSimpleActionSheet;
string = intl.string;
const QvQeLv = t.QvQeLv;
Reflect.apply(showSimpleActionSheet, value, [{'options': null, 'key': 'copy-info', 'header': null,
'stackingBehavior': 'stack', 'hasIcons': false, options: items, header: {title: Reflect.apply(string, intl,
[QvQeLv])}}]);
return value2;
}
function UserProfileOverflowMenuAction_81072() { // fn#81072, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10661:6887, owner: UserProfileOverflowMenu.action, offset: 0x01e98cc4, size: 97 bytes, params: 1, frame: 14
trackUserProfileAction({action: 'COPY_USER_ID', analyticsLocations: analyticsLocations});
const clipboardUtilsNativeModule = require(6797) /* metro dependency 6797: ClipboardUtilsNative */;
clipboardUtilsNativeModule.copy(id);
(require(3856) /* metro dependency 3856: ToastUtils */).presentIdCopied();
}
function UserProfileOverflowMenuAction_81073() { // fn#81073, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10661:7092, owner: UserProfileOverflowMenu.action, offset: 0x01e98d25, size: 72 bytes, params: 1, frame: 13
const value = environment.__proto__;
return (importDefault(8810) /* metro dependency 8810: openUserContextMenuCommands */)({userId: id,
selectedChannel: selectedChannel, showUserProfile: env0_13, analyticsLocations: analyticsLocations});
}
function UserProfileOverflowMenuChildren(a0) { // fn#81074, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10661:7314, owner: UserProfileOverflowMenu.children, offset: 0x01e98d6d, size: 241 bytes, params: 2, frame: 21
const ref = a0.ref;
const value = Object.create(null);
value.ref = 0;
const value2 = copyDataProperties({}, a0, value, undefined);
const IconButton = (require(8341) /* metro dependency 8341: IconButtonNative */).IconButton;
const iconButtonProps = {ref: ref, ...value2};
iconButtonProps['size'] = 'sm';
iconButtonProps['variant'] = 'secondary-overlay';
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
iconButtonProps['accessibilityLabel'] = intl.string((require(1244) /* metro dependency 1244: indexNative */).t['+zofAD']);
const MoreHorizontalIcon = (require(8638) /* metro dependency 8638: MoreHorizontalIcon */).MoreHorizontalIcon;
const WHITE = (importDefault(697) /* metro dependency 697: native */).colors.WHITE;
iconButtonProps['icon'] = <MoreHorizontalIcon size="sm" color={WHITE} />;
return <IconButton {...iconButtonProps} />;
}
function actionOnSuccess_81061() { // fn#81061, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10661:4217, owner: UserProfileOverflowMenu.action.onSuccess, offset: 0x01e985b8, size: 70 bytes, params: 1, frame: 16
let value = environment.__proto__.__proto__;
value = undefined;
const defaultImport = importDefault(6264) /* metro dependency 6264: SafetyToastsActionCreatorsNative */;
defaultImport.showBlockSuccessToast(id, channel == null ? value : channel.id);
return value;
}
function actionOnPress() { // fn#81068, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10661:5791, owner: UserProfileOverflowMenu.action.onPress, offset: 0x01e98ae4, size: 139 bytes, params: 1, frame: 18
const value = environment.__proto__;
trackUserProfileAction({action: 'COPY_USERNAME', analyticsLocations: analyticsLocations});
const clipboardUtilsNativeModule = require(6797) /* metro dependency 6797: ClipboardUtilsNative */;
const copy = clipboardUtilsNativeModule.copy;
const defaultImport = importDefault(3995) /* metro dependency 3995: UserUtils */;
const getUserTag = defaultImport.getUserTag;
Reflect.apply(copy, clipboardUtilsNativeModule, [Reflect.apply(getUserTag, defaultImport, [user,
{'decoration': 'never', 'identifiable': 'always'}])]);
(require(3856) /* metro dependency 3856: ToastUtils */).presentUsernameCopied();
}
function actionOnPress_81069() { // fn#81069, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10661:6027, owner: UserProfileOverflowMenu.action.onPress, offset: 0x01e98b6f, size: 97 bytes, params: 1, frame: 14
const value = environment.__proto__;
trackUserProfileAction({action: 'COPY_USER_ID', analyticsLocations: analyticsLocations});
const clipboardUtilsNativeModule = require(6797) /* metro dependency 6797: ClipboardUtilsNative */;
clipboardUtilsNativeModule.copy(id);
(require(3856) /* metro dependency 3856: ToastUtils */).presentIdCopied();
}
function actionOnPress_81070() { // fn#81070, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10661:6255, owner: UserProfileOverflowMenu.action.onPress, offset: 0x01e98bd0, size: 144 bytes, params: 1, frame: 18
let value = environment.__proto__;
const trackUserProfileActionBinding = trackUserProfileAction;
const value2 = undefined;
trackUserProfileActionBinding({action: 'COPY_AVATAR_IMAGE_LINK', analyticsLocations: analyticsLocations});
const userBinding = user;
const getAvatarURL = userBinding.getAvatarURL;
const guildId = displayProfile == null ? value2 : displayProfile.guildId;
value = environment.__proto__.__proto__;
const value3 = Reflect.apply(getAvatarURL, userBinding, [guildId, AVATAR_MAX_SIZE, true]);
if (value3 != null) {
value = require(6797) /* metro dependency 6797: ClipboardUtilsNative */;
value.copy(value3);
value = require(3856) /* metro dependency 3856: ToastUtils */;
value.presentLinkCopied();
}
return value2;
}
function actionOnPress_81071() { // fn#81071, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10661:6555, owner: UserProfileOverflowMenu.action.onPress, offset: 0x01e98c60, size: 100 bytes, params: 1, frame: 14
let value = environment.__proto__;
trackUserProfileAction({action: 'COPY_BANNER_IMAGE_LINK', analyticsLocations: analyticsLocations});
value = environment.__proto__.__proto__;
(require(6797) /* metro dependency 6797: ClipboardUtilsNative */).copy(env0_0);
(require(3856) /* metro dependency 3856: ToastUtils */).presentLinkCopied();
}