1081 lines
62 KiB
TypeScript
1081 lines
62 KiB
TypeScript
/* Metro module 10210; source: modules/user_profile/native/UserProfileActivity.tsx; dependencies: [57, 31, 27, 4234, 4492, 1379, 1867, 3784, 4396, 6876, 4297, 5189, 661, 33, 4501, 697, 477, 4573, 8872, 10211, 3868, 6887, 1244, 10216, 5475, 1423, 8846, 10219, 4002, 8838, 6885, 10220, 10238, 6771, 6789, 10244, 9953, 9963, 10245, 566, 5278, 6815, 1305, 10225, 10246, 10248, 10214, 10256, 10215, 10261, 8419, 10267, 10268, 4406, 7118, 10269, 10270, 4796, 8913, 4080, 10272, 10249, 4805, 10275, 8849, 9122, 5080, 7709, 6947, 8088, 10276, 10278, 10279, 2] */
|
|
function _fun79362(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#79362, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10396:6, offset: 0x01e4fd8c, size: 1028 bytes, params: 8, frame: 25
|
|
var object2;
|
|
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 */;
|
|
let value = require(27) /* metro dependency 27 */;
|
|
const env0_5 = value.TouchableOpacity;
|
|
const env0_6 = value.TouchableWithoutFeedback;
|
|
const env0_7 = value.View;
|
|
const applicationStore = importDefault(4234) /* metro dependency 4234: ApplicationStore */;
|
|
const applicationStreamingStore = importDefault(4492) /* metro dependency 4492: ApplicationStreamingStore */;
|
|
const channelStore = importDefault(1379) /* metro dependency 1379: ChannelStore */;
|
|
const guildStore = importDefault(1867) /* metro dependency 1867: GuildStore */;
|
|
const permissionStore = importDefault(3784) /* metro dependency 3784: PermissionStore */;
|
|
const presenceStore = importDefault(4396) /* metro dependency 4396: PresenceStore */;
|
|
const selfPresenceStore = importDefault(6876) /* metro dependency 6876: SelfPresenceStore */;
|
|
const voiceStateStore = importDefault(4297) /* metro dependency 4297: VoiceStateStore */;
|
|
const userProfileStore = importDefault(5189) /* metro dependency 5189: UserProfileStore */;
|
|
value = 12;
|
|
const value2 = require(dependencyMap[value]);
|
|
const env0_17 = value2.ActivityTypes;
|
|
const env0_18 = value2.Permissions;
|
|
const env0_19 = value2.PlatformTypes;
|
|
const env0_20 = value2.StatusTypes;
|
|
const value3 = require(33) /* metro dependency 33 */;
|
|
const env0_21 = value3.jsx;
|
|
const env0_22 = value3.jsxs;
|
|
const env0_23 = value3.Fragment;
|
|
const createStylesModule = require(4501) /* metro dependency 4501: createStyles */;
|
|
const createStyles = createStylesModule.createStyles;
|
|
object2 = {};
|
|
object2.card = {gap: value};
|
|
object2.cardTitle = {marginBottom: 0};
|
|
const TEXT_SUBTLE = (importDefault(697) /* metro dependency 697: native */).colors.TEXT_SUBTLE;
|
|
object2.cardTitleIcon = {tintColor: TEXT_SUBTLE};
|
|
const value5 = 16;
|
|
object2.body = {'flexDirection': 'row', 'alignItems': 'center', 'gap': 16};
|
|
object2.content = {flex: 1};
|
|
object2.imageContainer = {position: 'relative'};
|
|
object2.imageAspectRatio = {'width': 60, 'maxHeight': 60, 'aspectRatio': '1 / 1'};
|
|
object2.crunchyrollImageAspectRatio = {'width': 60, 'maxHeight': 100, 'aspectRatio': '2 / 3'};
|
|
const object3 = {'borderRadius': null, 'width': '100%', 'height': '100%'};
|
|
object3.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.xs;
|
|
object2.largeImage = object3;
|
|
const BACKGROUND_BASE_LOW = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_BASE_LOW;
|
|
object2.smallImageBackground = {'borderRadius': 16, 'position': 'absolute', 'right': -4, 'bottom': -4,
|
|
backgroundColor: BACKGROUND_BASE_LOW};
|
|
object2.smallImage = {'width': 24, 'height': 24, 'borderRadius': 12};
|
|
object2.badges = {'marginTop': 4, 'flexDirection': 'row', 'flexWrap': 'wrap', 'columnGap': 8, 'rowGap': 0};
|
|
let BORDER_SUBTLE = (importDefault(697) /* metro dependency 697: native */).colors.BORDER_SUBTLE;
|
|
object2.voiceChannelDivider = {'borderTopWidth': 1, 'borderTopColor': null, 'paddingTop': 12,
|
|
borderTopColor: BORDER_SUBTLE};
|
|
object2.customButtons = {'flexDirection': 'column', 'gap': 8};
|
|
const object4 = {'aspectRatio': 1.7777777777777777, 'borderRadius': null, 'overflow': 'hidden'};
|
|
object4.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.xs;
|
|
object2.streamPreview = object4;
|
|
object2.voiceActivityCard = {padding: 0};
|
|
object2.voiceSettings = {'padding': 0, 'marginBottom': -16};
|
|
BORDER_SUBTLE = (importDefault(697) /* metro dependency 697: native */).colors.BORDER_SUBTLE;
|
|
object2.voiceSettingsDivider = {'borderTopWidth': 1, 'borderTopColor': null, 'paddingTop': 16, 'marginTop': 4,
|
|
'marginHorizontal': -28, 'paddingHorizontal': 28, borderTopColor: BORDER_SUBTLE};
|
|
object2.voiceCallContent = {'flex': 1, 'gap': 4};
|
|
const value6 = require(dependencyMap[value5]);
|
|
object2.voiceCallNameIconWrapper = {'width': 22, 'height': null, 'justifyContent': 'center',
|
|
height: value6.isAndroid() ? value : value5};
|
|
const env0_24 = Reflect.apply(createStyles, createStylesModule, [object2]);
|
|
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/user_profile/native/UserProfileActivity.tsx');
|
|
exports.default = UserProfileActivity;
|
|
}
|
|
|
|
function ActivityCardText(a0) { // fn#79363, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10396:1679, offset: 0x01e50190, size: 137 bytes, params: 2, frame: 17
|
|
var r6;
|
|
const children = a0.children;
|
|
const value = null;
|
|
const value2 = Object.create(value);
|
|
value2.children = 0;
|
|
const value3 = copyDataProperties({}, a0, value2, r6);
|
|
r6 = typeof children !== 'string' ? children : children.trim();
|
|
if (value == r6 || r6 === '') {
|
|
return value;
|
|
} else {
|
|
const Text = (require(4573) /* metro dependency 4573: Text */).Text;
|
|
return (
|
|
<Text {...value3}>
|
|
{r6}
|
|
</Text>
|
|
);
|
|
}
|
|
}
|
|
|
|
function MaybeLink({href, children}) { // fn#79364, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10396:1823, offset: 0x01e50219, size: 75 bytes, params: 2, frame: 16
|
|
return href == null ? children : <TouchableOpacity accessibilityRole="link" onPress={onPress_79365}>{children}</TouchableOpacity>;
|
|
}
|
|
|
|
function ActivityCardBody({user, activity, application, onAction}) { // fn#79366, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10396:1966, offset: 0x01e50298, size: 2000 bytes, params: 2, frame: 40
|
|
var r15;
|
|
var large_url;
|
|
var r4;
|
|
var r5;
|
|
var r12;
|
|
var size;
|
|
var r17;
|
|
var r11;
|
|
var r9;
|
|
var object2;
|
|
const UnknownGameIcon = (require(10219) /* metro dependency 10219: UnknownGameIcon */).UnknownGameIcon;
|
|
var isThemeDark2;
|
|
var colors;
|
|
var object;
|
|
var items2;
|
|
var assets;
|
|
var defaultImport;
|
|
var moduleValue4;
|
|
var makeSource;
|
|
var src;
|
|
var alt;
|
|
var items3;
|
|
var value7;
|
|
var defaultImport2;
|
|
var moduleValue5;
|
|
var object3;
|
|
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
|
|
var object11;
|
|
var FastImage;
|
|
var moduleValue6;
|
|
var party;
|
|
var formatToPlainString;
|
|
var property;
|
|
var object5;
|
|
var value;
|
|
const styles = useStyles();
|
|
let {largeImage,
|
|
smallImage} = (require(10211) /* metro dependency 10211: ContentInventoryActivityImageUtils */).useImageForActivity(activity,
|
|
application, 'user_profile_activity_native');
|
|
const nativeModule = require(3868) /* metro dependency 3868: native */;
|
|
const useThemeContext = nativeModule.useThemeContext;
|
|
const theme = Reflect.apply(useThemeContext, nativeModule, []).theme;
|
|
let bot = user.bot;
|
|
if (bot) {
|
|
r5 = !bot;
|
|
} else {
|
|
if (largeImage == null) {
|
|
if (largeImage != null) {
|
|
object = {};
|
|
items2 = [styles.imageContainer];
|
|
r15 = (importDefault(8846) /* metro dependency 8846: isCrunchyrollActivity */)(activity) ? styles.crunchyrollImageAspectRatio : styles.imageAspectRatio;
|
|
items2[1] = r15;
|
|
object.style = items2;
|
|
var maybeLinkBindingProps2 = {href: activity.assets?.large_url};
|
|
defaultImport = importDefault(5475) /* metro dependency 5475: FastImage */;
|
|
moduleValue4 = require(1423) /* metro dependency 1423: AvatarUtils */;
|
|
makeSource = moduleValue4.makeSource;
|
|
src = largeImage.src;
|
|
alt = largeImage.alt;
|
|
largeImage = styles.largeImage;
|
|
items3 = [<MaybeLink {...maybeLinkBindingProps2}>{((Component) => <Component source={Reflect.apply(makeSource,
|
|
|
|
|
|
moduleValue4, [src])} alt={alt} style={largeImage} />)(defaultImport)}</MaybeLink>];
|
|
value7 = smallImage != null;
|
|
if (value7) {
|
|
var viewBinding4Props = {style: styles.smallImageBackground};
|
|
var maybeLinkBindingProps = {href: activity.assets?.small_url};
|
|
defaultImport2 = importDefault(5475) /* metro dependency 5475: FastImage */;
|
|
moduleValue5 = require(1423) /* metro dependency 1423: AvatarUtils */;
|
|
makeSource = moduleValue5.makeSource;
|
|
src = smallImage.src;
|
|
alt = smallImage.alt;
|
|
smallImage = styles.smallImage;
|
|
r15 = <View {...viewBinding4Props}><MaybeLink {...maybeLinkBindingProps}>{((Component) => <Component source={Reflect.apply(makeSource,
|
|
|
|
|
|
|
|
|
|
moduleValue5, [src])} alt={alt} style={smallImage} />)(defaultImport2)}</MaybeLink></View>;
|
|
} else {
|
|
r15 = value7;
|
|
}
|
|
items3[1] = r15;
|
|
r4 = <View {...object}>{items3}</View>;
|
|
} else {
|
|
var viewProps = {style: [styles.imageContainer, styles.imageAspectRatio]};
|
|
var unknownGameIconProps = {size: 'custom', style: styles.largeImage};
|
|
isThemeDark2 = (require(4002) /* metro dependency 4002: shared */).isThemeDark(theme);
|
|
colors = (importDefault(697) /* metro dependency 697: native */).colors;
|
|
unknownGameIconProps.color = isThemeDark2 ? colors.WHITE : colors.BLACK;
|
|
r4 = <View {...viewProps}><UnknownGameIcon {...unknownGameIconProps} /></View>;
|
|
}
|
|
} else if ((importDefault(6887) /* metro dependency 6887: isListeningOnSpotify */)(activity)) {
|
|
object3 = {accessibilityRole: 'button'};
|
|
alt = largeImage.alt;
|
|
object3.accessibilityLabel = alt;
|
|
object3.accessibilityHint = intl.string((require(1244) /* metro dependency 1244: indexNative */).t.sjjOk2);
|
|
object3.onPress = function() {
|
|
onAction({action: 'OPEN_SPOTIFY_ALBUM'});
|
|
require(dependencyMap[23]).openAlbum(activity, user.id);
|
|
};
|
|
var viewProps = {style: [styles.imageContainer, styles.imageAspectRatio]};
|
|
FastImage = importDefault(5475) /* metro dependency 5475: FastImage */;
|
|
moduleValue6 = require(1423) /* metro dependency 1423: AvatarUtils */;
|
|
makeSource = moduleValue6.makeSource;
|
|
src = largeImage.src;
|
|
alt = largeImage.alt;
|
|
largeImage = styles.largeImage;
|
|
r4 = <TouchableWithoutFeedback {...object3}><View {...viewProps}><FastImage source={Reflect.apply(makeSource,
|
|
|
|
moduleValue6, [src])} alt={alt} style={largeImage} /></View></TouchableWithoutFeedback>;
|
|
} else if (largeImage != null) {
|
|
object = {};
|
|
items2 = [styles.imageContainer];
|
|
r15 = (importDefault(8846) /* metro dependency 8846: isCrunchyrollActivity */)(activity) ? styles.crunchyrollImageAspectRatio : styles.imageAspectRatio;
|
|
items2[1] = r15;
|
|
object.style = items2;
|
|
var maybeLinkBindingProps2 = {href: activity.assets?.large_url};
|
|
defaultImport = importDefault(5475) /* metro dependency 5475: FastImage */;
|
|
moduleValue4 = require(1423) /* metro dependency 1423: AvatarUtils */;
|
|
makeSource = moduleValue4.makeSource;
|
|
src = largeImage.src;
|
|
alt = largeImage.alt;
|
|
largeImage = styles.largeImage;
|
|
items3 = [<MaybeLink {...maybeLinkBindingProps2}>{((Component) => <Component source={Reflect.apply(makeSource,
|
|
|
|
moduleValue4, [src])} alt={alt} style={largeImage} />)(defaultImport)}</MaybeLink>];
|
|
value7 = smallImage != null;
|
|
if (value7) {
|
|
var viewBinding4Props = {style: styles.smallImageBackground};
|
|
var maybeLinkBindingProps = {href: activity.assets?.small_url};
|
|
defaultImport2 = importDefault(5475) /* metro dependency 5475: FastImage */;
|
|
moduleValue5 = require(1423) /* metro dependency 1423: AvatarUtils */;
|
|
makeSource = moduleValue5.makeSource;
|
|
src = smallImage.src;
|
|
alt = smallImage.alt;
|
|
smallImage = styles.smallImage;
|
|
r15 = <View {...viewBinding4Props}><MaybeLink {...maybeLinkBindingProps}>{((Component) => <Component source={Reflect.apply(makeSource,
|
|
|
|
|
|
|
|
moduleValue5, [src])} alt={alt} style={smallImage} />)(defaultImport2)}</MaybeLink></View>;
|
|
} else {
|
|
r15 = value7;
|
|
}
|
|
items3[1] = r15;
|
|
r4 = <View {...object}>{items3}</View>;
|
|
} else {
|
|
var viewProps = {style: [styles.imageContainer, styles.imageAspectRatio]};
|
|
var unknownGameIconProps = {size: 'custom', style: styles.largeImage};
|
|
isThemeDark2 = (require(4002) /* metro dependency 4002: shared */).isThemeDark(theme);
|
|
colors = (importDefault(697) /* metro dependency 697: native */).colors;
|
|
unknownGameIconProps.color = isThemeDark2 ? colors.WHITE : colors.BLACK;
|
|
r4 = <View {...viewProps}><UnknownGameIcon {...unknownGameIconProps} /></View>;
|
|
}
|
|
r5 = r4;
|
|
}
|
|
const items6 = [(importDefault(6887) /* metro dependency 6887: isListeningOnSpotify */)(activity) ? <ActivityCardText variant="text-md/semibold">{((SpotifyTrack) => <SpotifyTrack text={activity.details} activity={activity} onPress={function() {
|
|
return onAction({action: 'OPEN_SPOTIFY_TRACK'});
|
|
}} />)((require(10216) /* metro dependency 10216: UserActivitySpotify */).SpotifyTrack)}</ActivityCardText> : <MaybeLink href={activity.details_url}><ActivityCardText variant="text-md/semibold">{(importDefault(8838) /* metro dependency 8838: isGameActivity */)(activity) ? activity.name : activity.details ?? activity.name}</ActivityCardText></MaybeLink>,
|
|
_fun79369()];
|
|
if ((importDefault(6887) /* metro dependency 6887: isListeningOnSpotify */)(activity)) {
|
|
r11 = null;
|
|
} else if (activity.type === ActivityTypes.WATCHING) {
|
|
r11 = null;
|
|
} else if ((importDefault(8838) /* metro dependency 8838: isGameActivity */)(activity)) {
|
|
if ((importDefault(6885) /* metro dependency 6885: isEmbeddedActivity */)(activity)) {
|
|
if ((importDefault(8838) /* metro dependency 8838: isGameActivity */)(activity)) {
|
|
party = activity.party;
|
|
size = party?.size;
|
|
r12 = size != null && activity.party.size.length >= 2;
|
|
if (r12) {
|
|
party = activity.party;
|
|
size = party.size;
|
|
if (size[1] === 0) {
|
|
r12 = intl.formatToPlainString((require(1244) /* metro dependency 1244: indexNative */).t.IM4J4e,
|
|
|
|
{count: activity.party.size[0]});
|
|
} else {
|
|
formatToPlainString = intl.formatToPlainString;
|
|
property = (require(1244) /* metro dependency 1244: indexNative */).t['u//9By'];
|
|
object5 = {};
|
|
party = activity.party;
|
|
size = party.size;
|
|
object5.count = size[0];
|
|
party = activity.party;
|
|
size = party.size;
|
|
object5.max = size[1];
|
|
r12 = Reflect.apply(formatToPlainString, intl, [property, object5]);
|
|
}
|
|
r17 = r12;
|
|
} else {
|
|
r17 = '';
|
|
}
|
|
r11 = <ActivityCardText variant="text-xs/medium" lineClamp={1}>{[activity.state,
|
|
r17].join(' ')}</ActivityCardText>;
|
|
} else {
|
|
assets = activity.assets;
|
|
large_url = assets?.large_url;
|
|
assets = activity.assets;
|
|
r11 = <MaybeLink href={large_url}><ActivityCardText variant="text-xs/medium" lineClamp={1}>{assets?.large_text}</ActivityCardText></MaybeLink>;
|
|
}
|
|
} else {
|
|
party = activity.party;
|
|
if (party != null) {
|
|
r11 = null;
|
|
} else if ((importDefault(8838) /* metro dependency 8838: isGameActivity */)(activity)) {
|
|
party = activity.party;
|
|
size = party?.size;
|
|
r12 = size != null && activity.party.size.length >= 2;
|
|
if (r12) {
|
|
party = activity.party;
|
|
size = party.size;
|
|
if (size[1] === 0) {
|
|
r12 = intl.formatToPlainString((require(1244) /* metro dependency 1244: indexNative */).t.IM4J4e,
|
|
|
|
{count: activity.party.size[0]});
|
|
} else {
|
|
formatToPlainString = intl.formatToPlainString;
|
|
property = (require(1244) /* metro dependency 1244: indexNative */).t['u//9By'];
|
|
object5 = {};
|
|
party = activity.party;
|
|
size = party.size;
|
|
object5.count = size[0];
|
|
party = activity.party;
|
|
size = party.size;
|
|
object5.max = size[1];
|
|
r12 = Reflect.apply(formatToPlainString, intl, [property, object5]);
|
|
}
|
|
r17 = r12;
|
|
} else {
|
|
r17 = '';
|
|
}
|
|
r11 = <ActivityCardText variant="text-xs/medium" lineClamp={1}>{[activity.state,
|
|
r17].join(' ')}</ActivityCardText>;
|
|
} else {
|
|
assets = activity.assets;
|
|
large_url = assets?.large_url;
|
|
assets = activity.assets;
|
|
r11 = <MaybeLink href={large_url}><ActivityCardText variant="text-xs/medium" lineClamp={1}>{assets?.large_text}</ActivityCardText></MaybeLink>;
|
|
}
|
|
}
|
|
} else if ((importDefault(8838) /* metro dependency 8838: isGameActivity */)(activity)) {
|
|
party = activity.party;
|
|
size = party?.size;
|
|
r12 = size != null && activity.party.size.length >= 2;
|
|
if (r12) {
|
|
party = activity.party;
|
|
size = party.size;
|
|
if (size[1] === 0) {
|
|
r12 = intl.formatToPlainString((require(1244) /* metro dependency 1244: indexNative */).t.IM4J4e,
|
|
{count: activity.party.size[0]});
|
|
} else {
|
|
formatToPlainString = intl.formatToPlainString;
|
|
property = (require(1244) /* metro dependency 1244: indexNative */).t['u//9By'];
|
|
object5 = {};
|
|
party = activity.party;
|
|
size = party.size;
|
|
object5.count = size[0];
|
|
party = activity.party;
|
|
size = party.size;
|
|
object5.max = size[1];
|
|
r12 = Reflect.apply(formatToPlainString, intl, [property, object5]);
|
|
}
|
|
r17 = r12;
|
|
} else {
|
|
r17 = '';
|
|
}
|
|
r11 = <ActivityCardText variant="text-xs/medium" lineClamp={1}>{[activity.state,
|
|
r17].join(' ')}</ActivityCardText>;
|
|
} else {
|
|
assets = activity.assets;
|
|
large_url = assets?.large_url;
|
|
assets = activity.assets;
|
|
r11 = <MaybeLink href={large_url}><ActivityCardText variant="text-xs/medium" lineClamp={1}>{assets?.large_text}</ActivityCardText></MaybeLink>;
|
|
}
|
|
items6[2] = r11;
|
|
bot = user.bot;
|
|
if (bot) {
|
|
r9 = !bot;
|
|
} else {
|
|
value = importDefault(10220) /* metro dependency 10220: UserProfileActivityCardBadges */;
|
|
value = ((Component) => <Component style={styles.badges} activity={activity} />)(value);
|
|
r9 = value;
|
|
}
|
|
items6[3] = r9;
|
|
return (
|
|
<View style={styles.body}>
|
|
{r5}
|
|
<View style={styles.content}>
|
|
{items6}
|
|
</View>
|
|
</View>
|
|
);
|
|
}
|
|
|
|
function ActivityCard({user, currentUser, activity, voiceChannel, style}) { // fn#79371, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10396:4781, offset: 0x01e50c3a, size: 1154 bytes, params: 2, frame: 41
|
|
var r11;
|
|
var r13;
|
|
var r0;
|
|
var AnalyticsLocationProvider;
|
|
var PressableOpacity;
|
|
var object3;
|
|
var intl;
|
|
var UserProfileCard;
|
|
var platformIcon;
|
|
var value9;
|
|
var Icon;
|
|
var moduleValue3;
|
|
var makeSource;
|
|
var items2;
|
|
let value = undefined;
|
|
const styles = useStyles();
|
|
const value3 = (importDefault(10238) /* metro dependency 10238: getActivityHeader */)(activity);
|
|
const defaultImport = importDefault(6771) /* metro dependency 6771: useAnalyticsLocations */;
|
|
const USER_PROFILE_LIVE_ACTIVITY_CARD = (importDefault(6789) /* metro dependency 6789: AnalyticsLocation */).USER_PROFILE_LIVE_ACTIVITY_CARD;
|
|
const analyticsLocations = defaultImport(USER_PROFILE_LIVE_ACTIVITY_CARD).analyticsLocations;
|
|
const value5 = (importDefault(10244) /* metro dependency 10244: useTrackUserProfileActivityAction */)({display: 'live',
|
|
voiceChannelId: voiceChannel == null ? value : voiceChannel.id, user: user, activity: activity,
|
|
analyticsLocations: analyticsLocations});
|
|
const env0_4 = value5;
|
|
const defaultImport3 = importDefault(9953) /* metro dependency 9953: useOpenGameProfileModal */;
|
|
object = {location: 'User Profile Activity Card'};
|
|
object.applicationId = activity.application_id ?? value;
|
|
const GameProfileSources = (require(9963) /* metro dependency 9963: GameProfileAnalyticUtils */).GameProfileSources;
|
|
const UserProfile = GameProfileSources.UserProfile;
|
|
object.source = UserProfile;
|
|
object.trackEntryPointImpression = true;
|
|
object.sourceUserId = user.id;
|
|
const value6 = defaultImport3(object);
|
|
const value7 = env0_4.useCallback(_fun79372, [value6]);
|
|
(importDefault(10245) /* metro dependency 10245: useTrackUserProfileActivityView */)({userId: user.id,
|
|
onAction: value5});
|
|
const fluxModule = require(566) /* metro dependency 566: flux */;
|
|
const useStateFromStores = fluxModule.useStateFromStores;
|
|
object = [GuildStore];
|
|
object[1] = VoiceStateStore;
|
|
object[2] = ChannelStore;
|
|
const guild = Reflect.apply(useStateFromStores, fluxModule, [object, _fun79373]);
|
|
const value8 = fluxModule.useStateFromStores([ApplicationStore], _fun79374);
|
|
const type = activity.type;
|
|
const CUSTOM_STATUS = ActivityTypes.CUSTOM_STATUS;
|
|
if (type === CUSTOM_STATUS) {
|
|
r0 = null;
|
|
} else if (activity.type === ActivityTypes.HANG_STATUS) {
|
|
r0 = null;
|
|
} else {
|
|
AnalyticsLocationProvider = (require(6771) /* metro dependency 6771: useAnalyticsLocations */).AnalyticsLocationProvider;
|
|
object = {value: analyticsLocations};
|
|
PressableOpacity = (require(5278) /* metro dependency 5278: Pressables */).PressableOpacity;
|
|
object3 = {onPress: value7, disabled: value6 == null, accessibilityRole: 'button'};
|
|
intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
|
|
object3.accessibilityLabel = intl.formatToPlainString((require(1244) /* metro dependency 1244: indexNative */).t['9sZWVp'],
|
|
|
|
{gameName: activity.name});
|
|
UserProfileCard = importDefault(6815) /* metro dependency 6815: UserProfileCard */;
|
|
var defaultImport5Props = {style: [styles.card, style], title: value3.text, titleStyle: styles.cardTitle};
|
|
platformIcon = value3.platformIcon;
|
|
value9 = platformIcon != null;
|
|
if (value9) {
|
|
Icon = (require(1305) /* metro dependency 1305: native */).Icon;
|
|
var iconProps = {style: styles.cardTitleIcon};
|
|
moduleValue3 = require(1423) /* metro dependency 1423: AvatarUtils */;
|
|
makeSource = moduleValue3.makeSource;
|
|
platformIcon = value3.platformIcon;
|
|
iconProps.source = Reflect.apply(makeSource, moduleValue3,
|
|
[platformIcon == null ? value : platformIcon.whitePNG]);
|
|
iconProps.size = (require(1305) /* metro dependency 1305: native */).IconSizes.SMALL_14;
|
|
iconProps.disableColor = true;
|
|
r11 = <Icon {...iconProps} />;
|
|
} else {
|
|
r11 = value9;
|
|
}
|
|
defaultImport5Props.titleIcon = r11;
|
|
items2 = [<ActivityCardBody user={user} activity={activity} application={value8} onAction={value5} />];
|
|
r13 = (importDefault(10225) /* metro dependency 10225: shouldShowActivityTimeBar */)(activity) ? ((Component) => <Component start={activity.timestamps.start} end={activity.timestamps.end} />)(importDefault(10246) /* metro dependency 10246: UserProfileActivityTimebar */) : null;
|
|
items2[1] = r13;
|
|
r13 = voiceChannel == null || guild == null ? null : ((Component) => <Component guild={guild} channel={voiceChannel} onAction={value5} style={styles.voiceChannelDivider} />)(importDefault(10248) /* metro dependency 10248: UserProfileActivityVoiceChannel */);
|
|
items2[2] = r13;
|
|
items2[3] = _fun79375();
|
|
value = <AnalyticsLocationProvider {...object}><PressableOpacity {...object3}><UserProfileCard {...defaultImport5Props}>{items2}</UserProfileCard></PressableOpacity></AnalyticsLocationProvider>;
|
|
r0 = value;
|
|
}
|
|
return r0;
|
|
}
|
|
|
|
function StreamActivityCard({user, stream, activity, style}) { // fn#79377, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10396:7539, offset: 0x01e515ae, size: 1268 bytes, params: 2, frame: 41
|
|
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
|
|
const styles = useStyles();
|
|
const channel = (require(566) /* metro dependency 566: flux */).useStateFromStores([ChannelStore], function() {
|
|
return ChannelStore.getChannel(stream.channelId);
|
|
});
|
|
const env0_3 = channel;
|
|
const value3 = (require(566) /* metro dependency 566: flux */).useStateFromStores([VoiceStateStore], function() {
|
|
return VoiceStateStore.isInChannel(channel?.id);
|
|
});
|
|
const guild = (require(566) /* metro dependency 566: flux */).useStateFromStores([GuildStore], function() {
|
|
return GuildStore.getGuild(stream.guildId);
|
|
});
|
|
const value4 = (require(566) /* metro dependency 566: flux */).useStateFromStores([PresenceStore], function() {
|
|
return PresenceStore.findActivity(user.id, _fun79382);
|
|
});
|
|
const activeStreamForUser = (require(566) /* metro dependency 566: flux */).useStateFromStores([ApplicationStreamingStore],
|
|
function() {
|
|
return ApplicationStreamingStore.getActiveStreamForUser(user.id, undefined);
|
|
});
|
|
const defaultImport = importDefault(10268) /* metro dependency 10268: useMuteAwareLocalVolume */;
|
|
const ownerId = activeStreamForUser?.ownerId;
|
|
const MediaEngineContextTypes = (require(4406) /* metro dependency 4406: mediaEngine */).MediaEngineContextTypes;
|
|
const STREAM = MediaEngineContextTypes.STREAM;
|
|
const {effectiveVolume, handleVolumeChange} = defaultImport(ownerId, STREAM);
|
|
const value6 = (require(566) /* metro dependency 566: flux */).useStateFromStores([ApplicationStore], _fun79384);
|
|
const property = env0_3((require(7118) /* metro dependency 7118: StreamPermissionUtils */).useCanWatchStream(channel),
|
|
1)[0];
|
|
const defaultImport2 = importDefault(6771) /* metro dependency 6771: useAnalyticsLocations */;
|
|
const USER_PROFILE_LIVE_ACTIVITY_CARD = (importDefault(6789) /* metro dependency 6789: AnalyticsLocation */).USER_PROFILE_LIVE_ACTIVITY_CARD;
|
|
const analyticsLocations = defaultImport2(USER_PROFILE_LIVE_ACTIVITY_CARD).analyticsLocations;
|
|
const value9 = (importDefault(10244) /* metro dependency 10244: useTrackUserProfileActivityAction */)({display: 'live',
|
|
voiceChannelId: channel?.id, user: user, stream: stream, analyticsLocations: analyticsLocations});
|
|
(importDefault(10245) /* metro dependency 10245: useTrackUserProfileActivityView */)({userId: user.id,
|
|
onAction: value9});
|
|
const defaultImport5 = importDefault(10269) /* metro dependency 10269: MobileAudioOutputExperiment */;
|
|
const useConfig = defaultImport5.useConfig;
|
|
const nonContextualStreamOutputPresent = Reflect.apply(useConfig, defaultImport5,
|
|
[{location: 'UserProfileVoiceSettings'}]).nonContextualStreamOutputPresent;
|
|
const AnalyticsLocationProvider = (require(6771) /* metro dependency 6771: useAnalyticsLocations */).AnalyticsLocationProvider;
|
|
const UserProfileCard = importDefault(6815) /* metro dependency 6815: UserProfileCard */;
|
|
const userProfileCardProps = {style: [styles.card, style],
|
|
title: value4 != null ? intl.formatToPlainString((require(1244) /* metro dependency 1244: indexNative */).t['4CQq9Q'],
|
|
{name: value4.name}) : intl.string((require(1244) /* metro dependency 1244: indexNative */).t['Jpkr/q']),
|
|
titleStyle: styles.cardTitle};
|
|
const LiveTag = (require(1305) /* metro dependency 1305: native */).LiveTag;
|
|
userProfileCardProps.titleIcon = <LiveTag />;
|
|
const VoicePanelStreamPreview = (require(10270) /* metro dependency 10270: VoicePanelStreamPreview */).VoicePanelStreamPreview;
|
|
const items2 = [<View style={styles.streamPreview}><VoicePanelStreamPreview mode={undefined} stream={stream} disabled={!property} onPress={onPress_79385} /></View>];
|
|
items2[1] = activeStreamForUser != null && !nonContextualStreamOutputPresent && ((Component) => <Component value={effectiveVolume} onValueChange={handleVolumeChange} key="set-stream-volume" />)(importDefault(10272) /* metro dependency 10272: VolumeSlider */);
|
|
items2[2] = activity != null && (importDefault(6885) /* metro dependency 6885: isEmbeddedActivity */)(activity) && <ActivityCardBody user={user} activity={activity} application={value6} onAction={value9} />;
|
|
items2[3] = guild != null && channel != null && ((Component) => <Component guild={guild} channel={channel} onAction={value9} style={styles.voiceChannelDivider} />)(importDefault(10248) /* metro dependency 10248: UserProfileActivityVoiceChannel */);
|
|
items2[4] = channel != null && ((VoiceChannelButtons) => <VoiceChannelButtons channel={channel} isInChannel={value3} onAction={value9} />)((require(10256) /* metro dependency 10256: UserProfileActivityButtons */).VoiceChannelButtons);
|
|
return (
|
|
<AnalyticsLocationProvider value={analyticsLocations}>
|
|
<UserProfileCard {...userProfileCardProps}>
|
|
{items2}
|
|
</UserProfileCard>
|
|
</AnalyticsLocationProvider>
|
|
);
|
|
}
|
|
|
|
function VoiceCallActivityCard({user, channel, isInChannel, style}) { // fn#79386, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10396:9520, offset: 0x01e51c91, size: 1462 bytes, params: 2, frame: 42
|
|
var r4;
|
|
var r17;
|
|
var r16;
|
|
var isGuildStageVoice2;
|
|
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
|
|
var string;
|
|
const t = (require(1244) /* metro dependency 1244: indexNative */).t;
|
|
const Text = (require(4573) /* metro dependency 4573: Text */).Text;
|
|
const PressableOpacity = (require(5278) /* metro dependency 5278: Pressables */).PressableOpacity;
|
|
var object9;
|
|
var object14;
|
|
var formatToPlainString;
|
|
var property;
|
|
var name;
|
|
var format;
|
|
const styles = useStyles();
|
|
const value3 = (importDefault(10249) /* metro dependency 10249: usePersonalizedVoiceChannelUsers */)(channel);
|
|
const value4 = (importDefault(4805) /* metro dependency 4805: useChannelName */)(channel);
|
|
const guild = (require(566) /* metro dependency 566: flux */).useStateFromStores([GuildStore], function() {
|
|
return GuildStore.getGuild(channel.guild_id);
|
|
});
|
|
const value5 = (require(566) /* metro dependency 566: flux */).useStateFromStores([PermissionStore], _fun79388);
|
|
const defaultImport = importDefault(6771) /* metro dependency 6771: useAnalyticsLocations */;
|
|
const USER_PROFILE_VOICE_ACTIVITY_CARD = (importDefault(6789) /* metro dependency 6789: AnalyticsLocation */).USER_PROFILE_VOICE_ACTIVITY_CARD;
|
|
const value6 = defaultImport(USER_PROFILE_VOICE_ACTIVITY_CARD);
|
|
const analyticsLocations = value6.analyticsLocations;
|
|
const env0_2 = value6.newestAnalyticsLocation;
|
|
const value7 = (importDefault(10244) /* metro dependency 10244: useTrackUserProfileActivityAction */)({display: 'voice',
|
|
activity: {type: 'VOICE'}, voiceChannelId: channel.id, user: user, analyticsLocations: analyticsLocations});
|
|
(importDefault(10245) /* metro dependency 10245: useTrackUserProfileActivityView */)({userId: user.id,
|
|
onAction: value7});
|
|
const UserProfileCard = importDefault(6815) /* metro dependency 6815: UserProfileCard */;
|
|
const items2 = [styles.card, style];
|
|
if (channel.isDM()) {
|
|
r4 = intl.string((require(1244) /* metro dependency 1244: indexNative */).t['9FaEzi']);
|
|
} else if (channel.isGroupDM()) {
|
|
r4 = intl.string((require(1244) /* metro dependency 1244: indexNative */).t['9FaEzi']);
|
|
} else {
|
|
isGuildStageVoice2 = channel.isGuildStageVoice();
|
|
string = intl.string;
|
|
r4 = isGuildStageVoice2 ? Reflect.apply(string, intl, [t.QygGCN]) : Reflect.apply(string, intl, [t.msxteM]);
|
|
}
|
|
const value12 = ((Component) => <Component users={value3} guildId={guild?.id} />)(importDefault(10275) /* metro dependency 10275: GroupAvatar */);
|
|
if (value5) {
|
|
r17 = <PressableOpacity accessibilityRole="button" accessibilityLabel={(importDefault(9122) /* metro dependency 9122: getChannelA11yLabel */)({channel: channel})} accessibilityHint={intl.string((require(1244) /* metro dependency 1244: indexNative */).t['9C444m'])} onPress={onPress_79389}><Text variant="text-md/semibold" color="mobile-text-heading-primary"><View style={styles.voiceCallNameIconWrapper}>{((Component) => <Component channel={channel} size="sm" color="mobile-text-heading-primary" />)(importDefault(8849) /* metro dependency 8849: UserProfileVoiceActivityIcon */)}</View>{value4}</Text></PressableOpacity>;
|
|
} else {
|
|
r17 = <Text variant="text-md/semibold" color="mobile-text-heading-primary"><View style={styles.voiceCallNameIconWrapper}>{((Component) => <Component channel={channel} size="sm" color="mobile-text-heading-primary" />)(importDefault(8849) /* metro dependency 8849: UserProfileVoiceActivityIcon */)}</View>{value4}</Text>;
|
|
}
|
|
if (guild == null) {
|
|
r16 = null;
|
|
} else {
|
|
var pressableOpacityProps = {accessibilityRole: 'button', accessibilityHint: intl.string(t.KLOhbO)};
|
|
formatToPlainString = intl.formatToPlainString;
|
|
property = t['hq/Qze'];
|
|
name = guild.name;
|
|
pressableOpacityProps.accessibilityLabel = Reflect.apply(formatToPlainString, intl, [property,
|
|
{guildName: name}]);
|
|
pressableOpacityProps.onPress = onPress_79390;
|
|
format = intl.format;
|
|
property = t['hq/Qze'];
|
|
name = guild.name;
|
|
r16 = <PressableOpacity {...pressableOpacityProps}><Text variant="text-xs/medium">{Reflect.apply(format, intl,
|
|
[property, {guildName: name}])}</Text></PressableOpacity>;
|
|
}
|
|
const view = <View style={styles.body}>{value12}<View style={styles.voiceCallContent}>{r17}{r16}</View></View>;
|
|
const VoiceChannelButtons = (require(10256) /* metro dependency 10256: UserProfileActivityButtons */).VoiceChannelButtons;
|
|
return (
|
|
<UserProfileCard
|
|
style={items2}
|
|
title={r4}
|
|
titleStyle={styles.cardTitle}
|
|
>
|
|
{view}
|
|
<VoiceChannelButtons
|
|
channel={channel}
|
|
isInChannel={isInChannel}
|
|
onAction={value7}
|
|
/>
|
|
</UserProfileCard>
|
|
);
|
|
}
|
|
|
|
function UserProfileActivity({user, currentUser, guildId, style}) { // fn#79391, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10396:11736, offset: 0x01e52386, size: 849 bytes, params: 2, frame: 36
|
|
var r14;
|
|
var r15;
|
|
var r6;
|
|
var r13;
|
|
var closure;
|
|
var jsxRuntimeEnv0_23Binding;
|
|
var value9;
|
|
var defaultImport4;
|
|
var items3;
|
|
var items5;
|
|
const styles = useStyles();
|
|
const {live, stream} = (importDefault(10276) /* metro dependency 10276: useUserProfileActivity */)(user.id);
|
|
const {voiceChannel,
|
|
voiceActivity} = (importDefault(10278) /* metro dependency 10278: useUserProfileVoiceActivity */)({userId: user.id,
|
|
guildId: guildId});
|
|
const value5 = (require(566) /* metro dependency 566: flux */).useStateFromStores([VoiceStateStore], _fun79392);
|
|
const isActive = user.id === currentUser.id;
|
|
const value6 = (require(566) /* metro dependency 566: flux */).useStateFromStores([SelfPresenceStore,
|
|
PresenceStore], _fun79393);
|
|
const value7 = (require(566) /* metro dependency 566: flux */).useStateFromStores([UserProfileStore], _fun79394);
|
|
if (value6) {
|
|
if (voiceChannel == null) {
|
|
if (value6) {
|
|
return null;
|
|
}
|
|
r14 = voiceActivity == null ? live : live.filter(function(a0) {
|
|
return a0 !== voiceActivity;
|
|
});
|
|
closure = renderVoiceActivityCard;
|
|
jsxRuntimeEnv0_23Binding = jsxRuntimeEnv0_23;
|
|
value9 = !value7;
|
|
r15 = value7 ? value9 : voiceChannel != null;
|
|
if (r15) {
|
|
if (value5) {
|
|
defaultImport4 = importDefault(6815) /* metro dependency 6815: UserProfileCard */;
|
|
var defaultImport4Props = {style: [styles.card, style]};
|
|
items3 = [closure(voiceChannel)];
|
|
items3[1] = ((Component) => <Component user={user} currentUser={currentUser} channel={voiceChannel} style={[styles.voiceSettings,
|
|
|
|
|
|
|
|
|
|
styles.voiceSettingsDivider]} />)(importDefault(10279) /* metro dependency 10279: UserProfileVoiceSettings */);
|
|
r6 = ((Component) => <Component {...defaultImport4Props}>{items3}</Component>)(defaultImport4);
|
|
} else {
|
|
r6 = ((Component) => <Component style={[styles.card,
|
|
style]}>{closure(voiceChannel)}</Component>)(importDefault(6815) /* metro dependency 6815: UserProfileCard */);
|
|
}
|
|
r15 = r6;
|
|
}
|
|
items5 = [r15];
|
|
r13 = value7 ? value9 : stream != null;
|
|
r13 = r13 && stream.channelId !== voiceChannel?.id;
|
|
r13 = r13 && <StreamActivityCard user={user} stream={stream} activity={voiceActivity} style={style} />;
|
|
items5[1] = r13;
|
|
items5[2] = r14.map(_fun79397);
|
|
return (
|
|
<>
|
|
{items5}
|
|
</>
|
|
);
|
|
}
|
|
if (value5) {
|
|
return ((Component) => <Component style={[styles.card,
|
|
style]}>{((Component) => <Component user={user} currentUser={currentUser} channel={voiceChannel} style={[styles.voiceSettings,
|
|
|
|
|
|
styles.voiceSettingsDivider]} />)(importDefault(10279) /* metro dependency 10279: UserProfileVoiceSettings */)}</Component>)(importDefault(6815) /* metro dependency 6815: UserProfileCard */);
|
|
}
|
|
if (value6) {
|
|
return null;
|
|
}
|
|
r14 = voiceActivity == null ? live : live.filter(_fun79395);
|
|
} else {
|
|
if (value7) {
|
|
if (voiceChannel == null) {
|
|
if (value6) {
|
|
return null;
|
|
}
|
|
r14 = voiceActivity == null ? live : live.filter(function(a0) {
|
|
return a0 !== voiceActivity;
|
|
});
|
|
closure = renderVoiceActivityCard;
|
|
jsxRuntimeEnv0_23Binding = jsxRuntimeEnv0_23;
|
|
value9 = !value7;
|
|
r15 = value7 ? value9 : voiceChannel != null;
|
|
if (r15) {
|
|
if (value5) {
|
|
defaultImport4 = importDefault(6815) /* metro dependency 6815: UserProfileCard */;
|
|
var defaultImport4Props = {style: [styles.card, style]};
|
|
items3 = [closure(voiceChannel)];
|
|
items3[1] = ((Component) => <Component user={user} currentUser={currentUser} channel={voiceChannel} style={[styles.voiceSettings,
|
|
|
|
|
|
|
|
|
|
|
|
styles.voiceSettingsDivider]} />)(importDefault(10279) /* metro dependency 10279: UserProfileVoiceSettings */);
|
|
r6 = ((Component) => <Component {...defaultImport4Props}>{items3}</Component>)(defaultImport4);
|
|
} else {
|
|
r6 = ((Component) => <Component style={[styles.card,
|
|
style]}>{closure(voiceChannel)}</Component>)(importDefault(6815) /* metro dependency 6815: UserProfileCard */);
|
|
}
|
|
r15 = r6;
|
|
}
|
|
items5 = [r15];
|
|
r13 = value7 ? value9 : stream != null;
|
|
r13 = r13 && stream.channelId !== voiceChannel?.id;
|
|
r13 = r13 && <StreamActivityCard user={user} stream={stream} activity={voiceActivity} style={style} />;
|
|
items5[1] = r13;
|
|
items5[2] = r14.map(_fun79397);
|
|
return (
|
|
<>
|
|
{items5}
|
|
</>
|
|
);
|
|
}
|
|
if (value5) {
|
|
return ((Component) => <Component style={[styles.card,
|
|
style]}>{((Component) => <Component user={user} currentUser={currentUser} channel={voiceChannel} style={[styles.voiceSettings,
|
|
|
|
|
|
|
|
styles.voiceSettingsDivider]} />)(importDefault(10279) /* metro dependency 10279: UserProfileVoiceSettings */)}</Component>)(importDefault(6815) /* metro dependency 6815: UserProfileCard */);
|
|
}
|
|
if (value6) {
|
|
return null;
|
|
}
|
|
r14 = voiceActivity == null ? live : live.filter(_fun79395);
|
|
closure = renderVoiceActivityCard;
|
|
jsxRuntimeEnv0_23Binding = jsxRuntimeEnv0_23;
|
|
value9 = !value7;
|
|
r15 = value7 ? value9 : voiceChannel != null;
|
|
if (r15) {
|
|
if (value5) {
|
|
defaultImport4 = importDefault(6815) /* metro dependency 6815: UserProfileCard */;
|
|
var defaultImport4Props = {style: [styles.card, style]};
|
|
items3 = [closure(voiceChannel)];
|
|
items3[1] = ((Component) => <Component user={user} currentUser={currentUser} channel={voiceChannel} style={[styles.voiceSettings,
|
|
|
|
|
|
|
|
|
|
styles.voiceSettingsDivider]} />)(importDefault(10279) /* metro dependency 10279: UserProfileVoiceSettings */);
|
|
r6 = ((Component) => <Component {...defaultImport4Props}>{items3}</Component>)(defaultImport4);
|
|
} else {
|
|
r6 = ((Component) => <Component style={[styles.card,
|
|
style]}>{closure(voiceChannel)}</Component>)(importDefault(6815) /* metro dependency 6815: UserProfileCard */);
|
|
}
|
|
r15 = r6;
|
|
}
|
|
items5 = [r15];
|
|
r13 = value7 ? value9 : stream != null;
|
|
r13 = r13 && stream.channelId !== voiceChannel?.id;
|
|
r13 = r13 && <StreamActivityCard user={user} stream={stream} activity={voiceActivity} style={style} />;
|
|
items5[1] = r13;
|
|
items5[2] = r14.map(_fun79397);
|
|
return (
|
|
<>
|
|
{items5}
|
|
</>
|
|
);
|
|
}
|
|
if (value6) {
|
|
return null;
|
|
}
|
|
r14 = voiceActivity == null ? live : live.filter(function(a0) {
|
|
return a0 !== voiceActivity;
|
|
});
|
|
}
|
|
closure = renderVoiceActivityCard;
|
|
jsxRuntimeEnv0_23Binding = jsxRuntimeEnv0_23;
|
|
value9 = !value7;
|
|
r15 = value7 ? value9 : voiceChannel != null;
|
|
if (r15) {
|
|
if (value5) {
|
|
defaultImport4 = importDefault(6815) /* metro dependency 6815: UserProfileCard */;
|
|
var defaultImport4Props = {style: [styles.card, style]};
|
|
items3 = [closure(voiceChannel)];
|
|
items3[1] = ((Component) => <Component user={user} currentUser={currentUser} channel={voiceChannel} style={[styles.voiceSettings,
|
|
|
|
|
|
styles.voiceSettingsDivider]} />)(importDefault(10279) /* metro dependency 10279: UserProfileVoiceSettings */);
|
|
r6 = ((Component) => <Component {...defaultImport4Props}>{items3}</Component>)(defaultImport4);
|
|
} else {
|
|
r6 = ((Component) => <Component style={[styles.card,
|
|
style]}>{closure(voiceChannel)}</Component>)(importDefault(6815) /* metro dependency 6815: UserProfileCard */);
|
|
}
|
|
r15 = r6;
|
|
}
|
|
items5 = [r15];
|
|
items5[1] = (value7 ? value9 : stream != null) && stream.channelId !== voiceChannel?.id && <StreamActivityCard user={user} stream={stream} activity={voiceActivity} style={style} />;
|
|
items5[2] = r14.map(_fun79397);
|
|
return (
|
|
<>
|
|
{items5}
|
|
</>
|
|
);
|
|
}
|
|
|
|
function MaybeLinkOnPress() { // fn#79365, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10396:1918, owner: MaybeLink.onPress, offset: 0x01e50264, size: 52 bytes, params: 1, frame: 12
|
|
const value = environment.__proto__;
|
|
return (require(8872) /* metro dependency 8872: MaskedLinkUtils */).handleClick({href: href});
|
|
}
|
|
|
|
function _fun79369() { // fn#79369, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10396:3589, offset: 0x01e50ad0, size: 334 bytes, params: 1, frame: 20
|
|
var environment;
|
|
var r9;
|
|
var state;
|
|
var value7;
|
|
const value = environment.__proto__;
|
|
const value2 = undefined;
|
|
const value4 = (importDefault(6887) /* metro dependency 6887: isListeningOnSpotify */)(activity);
|
|
activityBinding = activity;
|
|
if (value4) {
|
|
state = activityBinding.state;
|
|
value7 = null;
|
|
r9 = value7 == state ? value2 : state.trim();
|
|
return value7 == r9 || r9 === '' ? value7 : <ActivityCardText variant="text-xs/medium" lineClamp={1}>{((SpotifyArtists) => <SpotifyArtists artists={r9} activity={activity} userId={user.id} onPress={function() {
|
|
return onAction({action: 'OPEN_SPOTIFY_ARTIST'});
|
|
}} />)((require(10216) /* metro dependency 10216: UserActivitySpotify */).SpotifyArtists)}</ActivityCardText>;
|
|
}
|
|
return (
|
|
<MaybeLink href={activity.state_url}>
|
|
<ActivityCardText variant="text-xs/medium" lineClamp={1}>
|
|
{(importDefault(8838) /* metro dependency 8838: isGameActivity */)(activityBinding) || activity.state == null ? activityBinding.details : activity.state}
|
|
</ActivityCardText>
|
|
</MaybeLink>
|
|
);
|
|
}
|
|
|
|
function _fun79373() { // fn#79373, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10396:5380, offset: 0x01e510bc, size: 158 bytes, params: 1, frame: 18
|
|
var channelId;
|
|
var r0;
|
|
var value4;
|
|
var getGuild;
|
|
let value = environment.__proto__;
|
|
const value2 = undefined;
|
|
if ((importDefault(6885) /* metro dependency 6885: isEmbeddedActivity */)(activity)) {
|
|
value4 = VoiceStateStore.getVoiceStateForSession(user.id, activity == null ? value2 : activity.session_id);
|
|
channelId = value4 == null ? value2 : value4.channelId;
|
|
getGuild = GuildStore.getGuild;
|
|
value = ChannelStore.getChannel(channelId);
|
|
if (value == null) {
|
|
r0 = value2;
|
|
} else {
|
|
value = value.getGuildId();
|
|
r0 = value;
|
|
}
|
|
return Reflect.apply(getGuild, GuildStore, [r0]);
|
|
}
|
|
return null;
|
|
}
|
|
|
|
function _fun79374() { // fn#79374, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10396:5617, offset: 0x01e5115a, size: 96 bytes, params: 1, frame: 13
|
|
const application_id = activity.application_id;
|
|
const value2 = null;
|
|
return value2 != application_id ? ApplicationStore.getApplication(activity.application_id) : value2 != activity.name ? ApplicationStore.getApplicationByName(activity.name) : value2;
|
|
}
|
|
|
|
function _fun79375() { // fn#79375, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10396:6568, offset: 0x01e511ba, size: 930 bytes, params: 1, frame: 19
|
|
var environment;
|
|
var r0;
|
|
var currentActivityGamePlatform;
|
|
var Set;
|
|
var value5;
|
|
var set;
|
|
const value = environment.__proto__;
|
|
const value2 = undefined;
|
|
if ((importDefault(10214) /* metro dependency 10214: isOnXbox */)(activity)) {
|
|
const ConnectPlatformButton = (require(10256) /* metro dependency 10256: UserProfileActivityButtons */).ConnectPlatformButton;
|
|
return <ConnectPlatformButton type={PlatformTypes.XBOX} onAction={env0_4} />;
|
|
}
|
|
if ((importDefault(10215) /* metro dependency 10215: isOnPlayStation */)(activity)) {
|
|
const ConnectPlatformButton2 = (require(10256) /* metro dependency 10256: UserProfileActivityButtons */).ConnectPlatformButton;
|
|
return <ConnectPlatformButton2 type={PlatformTypes.PLAYSTATION} onAction={env0_4} />;
|
|
}
|
|
if (user.id === currentUser.id) {
|
|
return null;
|
|
}
|
|
if ((importDefault(6887) /* metro dependency 6887: isListeningOnSpotify */)(activity)) {
|
|
const PlayOnSpotifyButton = (require(10256) /* metro dependency 10256: UserProfileActivityButtons */).PlayOnSpotifyButton;
|
|
return <PlayOnSpotifyButton activity={activity} onAction={env0_4} />;
|
|
}
|
|
if ((importDefault(6885) /* metro dependency 6885: isEmbeddedActivity */)(activity)) {
|
|
const JoinActivityButton = (require(10256) /* metro dependency 10256: UserProfileActivityButtons */).JoinActivityButton;
|
|
return (
|
|
<JoinActivityButton
|
|
user={user}
|
|
currentUser={currentUser}
|
|
activity={activity}
|
|
application={env0_6}
|
|
onAction={env0_4}
|
|
/>
|
|
);
|
|
}
|
|
if ((importDefault(8838) /* metro dependency 8838: isGameActivity */)(activity)) {
|
|
currentActivityGamePlatform = (require(10261) /* metro dependency 10261: isActivityJoinableOnCurrentPlatform */).getCurrentActivityGamePlatform();
|
|
Set = global.Set;
|
|
r0 = activity.supported_platforms ?? [];
|
|
value5 = Object.create(Set.prototype, {constructor: {value: Set}});
|
|
set = new Set();
|
|
if ((set instanceof Object ? set : value5).has(currentActivityGamePlatform)) {
|
|
if (activity.party != null) {
|
|
if ((env0_6 == null ? value2 : env0_6.deepLinkUri) != null) {
|
|
if (activity.session_id == null) {
|
|
if ((importDefault(8419) /* metro dependency 8419: isStreaming */)(activity)) {
|
|
const WatchActivityButton = (require(10256) /* metro dependency 10256: UserProfileActivityButtons */).WatchActivityButton;
|
|
return <WatchActivityButton activity={activity} onAction={env0_4} />;
|
|
} else {
|
|
return activity.buttons != null && activity.buttons.length > 0 ? <View style={styles.customButtons}>{activity.buttons.map(_fun79376)}</View> : null;
|
|
}
|
|
}
|
|
if (env0_6 != null) {
|
|
const JoinGameActivityButton = (require(10256) /* metro dependency 10256: UserProfileActivityButtons */).JoinGameActivityButton;
|
|
return (
|
|
<JoinGameActivityButton
|
|
user={user}
|
|
currentUser={currentUser}
|
|
activity={activity}
|
|
application={env0_6}
|
|
onAction={env0_4}
|
|
/>
|
|
);
|
|
}
|
|
if ((importDefault(8419) /* metro dependency 8419: isStreaming */)(activity)) {
|
|
const WatchActivityButton2 = (require(10256) /* metro dependency 10256: UserProfileActivityButtons */).WatchActivityButton;
|
|
return <WatchActivityButton2 activity={activity} onAction={env0_4} />;
|
|
} else {
|
|
return activity.buttons != null && activity.buttons.length > 0 ? <View style={styles.customButtons}>{activity.buttons.map(_fun79376)}</View> : null;
|
|
}
|
|
}
|
|
if ((importDefault(8419) /* metro dependency 8419: isStreaming */)(activity)) {
|
|
const WatchActivityButton3 = (require(10256) /* metro dependency 10256: UserProfileActivityButtons */).WatchActivityButton;
|
|
return <WatchActivityButton3 activity={activity} onAction={env0_4} />;
|
|
} else {
|
|
return activity.buttons != null && activity.buttons.length > 0 ? <View style={styles.customButtons}>{activity.buttons.map(_fun79376)}</View> : null;
|
|
}
|
|
}
|
|
if ((importDefault(8419) /* metro dependency 8419: isStreaming */)(activity)) {
|
|
const WatchActivityButton4 = (require(10256) /* metro dependency 10256: UserProfileActivityButtons */).WatchActivityButton;
|
|
return <WatchActivityButton4 activity={activity} onAction={env0_4} />;
|
|
} else {
|
|
return activity.buttons != null && activity.buttons.length > 0 ? <View style={styles.customButtons}>{activity.buttons.map(_fun79376)}</View> : null;
|
|
}
|
|
}
|
|
}
|
|
if ((importDefault(8419) /* metro dependency 8419: isStreaming */)(activity)) {
|
|
const WatchActivityButton5 = (require(10256) /* metro dependency 10256: UserProfileActivityButtons */).WatchActivityButton;
|
|
return <WatchActivityButton5 activity={activity} onAction={env0_4} />;
|
|
} else {
|
|
return activity.buttons != null && activity.buttons.length > 0 ? <View style={styles.customButtons}>{activity.buttons.map(_fun79376)}</View> : null;
|
|
}
|
|
}
|
|
|
|
function _fun79381() { // fn#79381, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10396:7856, offset: 0x01e51b10, size: 42 bytes, params: 1, frame: 13
|
|
return PresenceStore.findActivity(user.id, _fun79382);
|
|
}
|
|
|
|
function _fun79384() { // fn#79384, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10396:8148, offset: 0x01e51b9f, size: 122 bytes, params: 1, frame: 13
|
|
const activityBinding = activity;
|
|
const value2 = null;
|
|
const value3 = undefined;
|
|
return value2 != (value2 == activityBinding ? value3 : activity.application_id) ? ApplicationStore.getApplication(activity.application_id) : value2 != (value2 == activity ? value3 : activity.name) ? ApplicationStore.getApplicationByName(activity.name) : value2;
|
|
}
|
|
|
|
function StreamActivityCardOnPress() { // fn#79385, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10396:9041, owner: StreamActivityCard.onPress, offset: 0x01e51c19, size: 120 bytes, params: 1, frame: 16
|
|
env0_4({action: 'PRESS_IMAGE'});
|
|
const defaultImport = importDefault(4796) /* metro dependency 4796: SelectedChannelActionCreators */;
|
|
const selectVoiceChannel = defaultImport.selectVoiceChannel;
|
|
const streamBinding = stream;
|
|
Reflect.apply(selectVoiceChannel, defaultImport, [streamBinding.channelId]);
|
|
(require(8913) /* metro dependency 8913: StreamActionCreators */).watchStreamAndTransitionToStream(streamBinding);
|
|
(importDefault(4080) /* metro dependency 4080: ActionSheetActionCreators */).hideActionSheet();
|
|
}
|
|
|
|
function _fun79388() { // fn#79388, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10396:9730, offset: 0x01e52267, size: 55 bytes, params: 1, frame: 14
|
|
return channel.isPrivate() || PermissionStore.can(Permissions.CONNECT, channel);
|
|
}
|
|
|
|
function VoiceCallActivityCardOnPress() { // fn#79389, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10396:10542, owner: VoiceCallActivityCard.onPress, offset: 0x01e5229e, size: 119 bytes, params: 1, frame: 16
|
|
env0_3({action: 'OPEN_VOICE_CHANNEL'});
|
|
(importDefault(4080) /* metro dependency 4080: ActionSheetActionCreators */).hideActionSheet();
|
|
(importDefault(5080) /* metro dependency 5080: ModalActionCreators */).popAll();
|
|
const privateChannelCallUtilsModule = require(7709) /* metro dependency 7709: PrivateChannelCallUtils */;
|
|
privateChannelCallUtilsModule.openGuildVoiceModal(channel, newestAnalyticsLocation);
|
|
}
|
|
|
|
function VoiceCallActivityCardOnPress_79390() { // fn#79390, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10396:11328, owner: VoiceCallActivityCard.onPress, offset: 0x01e52315, size: 113 bytes, params: 1, frame: 14
|
|
env0_3({action: 'OPEN_VOICE_GUILD'});
|
|
const transitionToGuildNativeModule = require(6947) /* metro dependency 6947: transitionToGuildNative */;
|
|
transitionToGuildNativeModule.transitionToGuild(guild.id);
|
|
(importDefault(8088) /* metro dependency 8088: closeVoicePanels */)();
|
|
(importDefault(4080) /* metro dependency 4080: ActionSheetActionCreators */).hideActionSheet();
|
|
}
|
|
|
|
function _fun79392() { // fn#79392, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10396:11960, offset: 0x01e526d7, size: 45 bytes, params: 1, frame: 12
|
|
return voiceChannel != null && VoiceStateStore.isInChannel(voiceChannel.id);
|
|
}
|
|
|
|
function _fun79393() { // fn#79393, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10396:12046, offset: 0x01e52704, size: 86 bytes, params: 1, frame: 12
|
|
const r2 = result ? SelfPresenceStore.getStatus() : PresenceStore.getStatus(user.id);
|
|
const OFFLINE = StatusTypes.OFFLINE;
|
|
return r2 === OFFLINE || r2 === StatusTypes.INVISIBLE;
|
|
}
|
|
|
|
function _fun79394() { // fn#79394, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10396:12167, offset: 0x01e5275a, size: 55 bytes, params: 1, frame: 11
|
|
const value = environment.__proto__;
|
|
return UserProfileStore.getUserProfile(user.id)?.private === true;
|
|
}
|
|
|
|
function _fun79395(a0) { // fn#79395, offset: 0x01e52791, size: 16 bytes, params: 2, frame: 2
|
|
return a0 !== voiceActivity;
|
|
}
|
|
|
|
function renderVoiceActivityCard(a0) { // fn#79396, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10396:12483, owner: UserProfileActivity.renderVoiceActivityCard, offset: 0x01e527a1, size: 234 bytes, params: 2, frame: 16
|
|
return stream == null ? voiceActivity != null ? <ActivityCard user={user} currentUser={currentUser} activity={voiceActivity} voiceChannel={a0} style={styles.voiceActivityCard} /> : <VoiceCallActivityCard user={user} channel={a0} isInChannel={env0_7} style={styles.voiceActivityCard} /> : stream.channelId === a0.id ? <StreamActivityCard user={user} stream={stream} activity={voiceActivity} style={styles.voiceActivityCard} /> : voiceActivity != null ? <ActivityCard user={user} currentUser={currentUser} activity={voiceActivity} voiceChannel={a0} style={styles.voiceActivityCard} /> : <VoiceCallActivityCard user={user} channel={a0} isInChannel={env0_7} style={styles.voiceActivityCard} />;
|
|
}
|
|
|
|
function _fun79397(a0, a1) { // fn#79397, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10396:13163, offset: 0x01e5288b, size: 78 bytes, params: 3, frame: 17
|
|
return (
|
|
<ActivityCard
|
|
user={user}
|
|
currentUser={currentUser}
|
|
activity={a0}
|
|
style={style}
|
|
key={a0.application_id ?? a1}
|
|
/>
|
|
);
|
|
}
|
|
|
|
function _fun79376(a0, a1) { // fn#79376, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10396:7438, offset: 0x01e5155c, size: 82 bytes, params: 3, frame: 17
|
|
const CustomActivityButton = (require(10256) /* metro dependency 10256: UserProfileActivityButtons */).CustomActivityButton;
|
|
return (
|
|
<CustomActivityButton
|
|
index={a1}
|
|
user={user}
|
|
activity={activity}
|
|
onAction={env1_4}
|
|
key={a1}
|
|
/>
|
|
);
|
|
}
|
|
|
|
function _fun79382(a0) { // fn#79382, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10396:7881, offset: 0x01e51b3a, size: 66 bytes, params: 2, frame: 14
|
|
const value = environment.__proto__.__proto__;
|
|
return (importDefault(8838) /* metro dependency 8838: isGameActivity */)(a0) && !(importDefault(10267) /* metro dependency 10267: isOnConsole */)(a0);
|
|
}
|
|
|