Initial commit
This commit is contained in:
commit
af3b49f756
16065 files changed
+2938410
No files matched your search
@@ -0,0 +1,189 @@
|
||||
/* Metro module 14431; source: modules/home_drawer/native/HomeDrawerGuildVoiceState.tsx; dependencies: [31, 27, 1935, 3793, 4300, 661, 33, 4501, 697, 10251, 1305, 477, 4573, 1244, 10271, 5475, 566, 22, 14420, 2] */
|
||||
function _fun109215(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#109215, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14628:6, offset: 0x02341e85, size: 560 bytes, params: 8, frame: 25
|
||||
var object5;
|
||||
const env0_0 = require;
|
||||
const Object = global.Object;
|
||||
Object.defineProperty(exports, '__esModule', {value: true});
|
||||
const value = 0;
|
||||
const env0_3 = importAll(dependencyMap[value]);
|
||||
const env0_4 = (require(27) /* metro dependency 27 */).View;
|
||||
const guildChannelStore = importDefault(1935) /* metro dependency 1935: GuildChannelStore */;
|
||||
const env0_6 = (require(1935) /* metro dependency 1935: GuildChannelStore */).GUILD_VOCAL_CHANNELS_KEY;
|
||||
const relationshipStore = importDefault(3793) /* metro dependency 3793: RelationshipStore */;
|
||||
const sortedVoiceStateStore = importDefault(4300) /* metro dependency 4300: SortedVoiceStateStore */;
|
||||
const env0_9 = (require(661) /* metro dependency 661: Constants */).ChannelTypes;
|
||||
const value2 = require(33) /* metro dependency 33 */;
|
||||
const env0_10 = value2.jsx;
|
||||
const env0_11 = value2.jsxs;
|
||||
const createStylesModule = require(4501) /* metro dependency 4501: createStyles */;
|
||||
let createStyles = createStylesModule.createStyles;
|
||||
const object6 = {'width': 72, 'height': 44, 'borderRadius': null, 'overflow': 'hidden'};
|
||||
object6.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.sm;
|
||||
const env0_12 = Reflect.apply(createStyles, createStylesModule, [{voiceContainer: {'paddingRight': 8, 'height': 40,
|
||||
'gap': 4, 'justifyContent': 'center'}, streamPreview: object6}]);
|
||||
const value4 = createStylesModule;
|
||||
createStyles = value4.createStyles;
|
||||
object5 = {};
|
||||
const object7 = {'paddingHorizontal': 5, 'paddingVertical': 1, 'borderBottomRightRadius': null,
|
||||
'overflow': 'hidden', 'justifyContent': 'center', 'alignItems': 'center', 'backgroundColor': null,
|
||||
'position': 'absolute', 'top': 0, 'left': 0};
|
||||
object7.borderBottomRightRadius = (importDefault(697) /* metro dependency 697: native */).radii.xs;
|
||||
const RED_400 = (importDefault(697) /* metro dependency 697: native */).unsafe_rawColors.RED_400;
|
||||
object7.backgroundColor = RED_400;
|
||||
object5.tag = object7;
|
||||
const object8 = {textAlign: 'center'};
|
||||
const WHITE = (importDefault(697) /* metro dependency 697: native */).unsafe_rawColors.WHITE;
|
||||
object8.color = WHITE;
|
||||
const platformUtilsModule = require(477) /* metro dependency 477: PlatformUtils */;
|
||||
object8.marginTop = platformUtilsModule.isAndroid() ? -2 : value;
|
||||
object5.tagText = object8;
|
||||
const env0_13 = Reflect.apply(createStyles, value4, [object5]);
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/home_drawer/native/HomeDrawerGuildVoiceState.tsx');
|
||||
exports.GuildVoiceState = GuildVoiceState;
|
||||
exports.useVoiceUsers = useVoiceUsers;
|
||||
}
|
||||
|
||||
function VoiceUsers({voiceUsers, guildId}) { // fn#109216, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14628:417, offset: 0x023420b5, size: 227 bytes, params: 2, frame: 23
|
||||
const r10 = voiceUsers.length > 3 ? voiceUsers.slice(0, 3) : voiceUsers;
|
||||
return voiceUsers.length === 0 ? null : <View style={{'flexDirection': 'row', 'alignItems': 'center',
|
||||
'gap': 4}}>{((AvatarPile) => <AvatarPile size={(require(1305) /* metro dependency 1305: native */).AvatarSizes.XSMALL} names={r10.map(function(a0) {
|
||||
return a0.username;
|
||||
})} totalCount={voiceUsers.length}>{r10.map(_fun109218)}</AvatarPile>)((require(10251) /* metro dependency 10251: AvatarPileNative */).AvatarPile)}</View>;
|
||||
}
|
||||
|
||||
function LiveTag_109219() { // fn#109219, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14628:1165, offset: 0x023421fd, size: 166 bytes, params: 1, frame: 21
|
||||
const styles = useStyles();
|
||||
const Text = (require(4573) /* metro dependency 4573: Text */).Text;
|
||||
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
|
||||
return (
|
||||
<View style={styles.tag}>
|
||||
<Text
|
||||
variant="text-xs/bold"
|
||||
style={styles.tagText}
|
||||
lineClamp={1}
|
||||
>
|
||||
{intl.string((require(1244) /* metro dependency 1244: indexNative */).t.dI3q4h).toUpperCase()}
|
||||
</Text>
|
||||
</View>
|
||||
);
|
||||
}
|
||||
|
||||
function GuildVoiceState({voiceUsers, streamingChannelId, streamingUser, guildId}) { // fn#109220, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14628:1471, offset: 0x023422a3, size: 323 bytes, params: 2, frame: 27
|
||||
var r5;
|
||||
var r0;
|
||||
var object;
|
||||
var object2;
|
||||
var streamPreview;
|
||||
var FastImage;
|
||||
const styles = useStyles();
|
||||
const value3 = voiceUsers.length > 0;
|
||||
const previewUrl = (importDefault(10271) /* metro dependency 10271: useFetchStreamPreview */)(guildId,
|
||||
streamingChannelId ?? undefined, streamingUser?.id).previewUrl;
|
||||
if (value3) {
|
||||
var viewProps = {style: [styles.voiceContainer, {height: streamingUser != null ? 48 : 32}]};
|
||||
if (previewUrl == null) {
|
||||
r5 = <VoiceUsers voiceUsers={voiceUsers} guildId={guildId} />;
|
||||
} else {
|
||||
object2 = {};
|
||||
streamPreview = styles.streamPreview;
|
||||
object2.style = streamPreview;
|
||||
FastImage = importDefault(5475) /* metro dependency 5475: FastImage */;
|
||||
streamPreview = styles.streamPreview;
|
||||
r5 = <View {...object2}><FastImage style={streamPreview} source={{uri: previewUrl}} /><LiveTag_109219 /></View>;
|
||||
}
|
||||
r0 = <View {...viewProps}>{r5}</View>;
|
||||
} else {
|
||||
r0 = null;
|
||||
}
|
||||
return r0;
|
||||
}
|
||||
|
||||
function useVoiceUsers(a0) { // fn#109221, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14628:1891, offset: 0x023423e6, size: 302 bytes, params: 2, frame: 23
|
||||
const env0_0 = a0;
|
||||
const id = a0.id;
|
||||
const value2 = (require(566) /* metro dependency 566: flux */).useStateFromStoresArray([GuildChannelStore],
|
||||
_fun109222, [id]);
|
||||
const value3 = (require(566) /* metro dependency 566: flux */).useStateFromStores([SortedVoiceStateStore],
|
||||
function() {
|
||||
return SortedVoiceStateStore.getVoiceStates(id);
|
||||
}, [id]);
|
||||
const env0_3 = value3;
|
||||
const value4 = (require(566) /* metro dependency 566: flux */).useStateFromStoresArray([RelationshipStore],
|
||||
function() {
|
||||
return RelationshipStore.getBlockedOrIgnoredIDs();
|
||||
});
|
||||
const binding = env0_3;
|
||||
const value = binding.useMemo(_fun109227, [value2, value3, a0.afkChannelId, value4]);
|
||||
const value5 = binding.useMemo(_fun109230, [value3, a0.afkChannelId, value2]);
|
||||
return {voiceUsers: value, streamingUser: value5.streamingUser, streamingChannelId: value5.streamingChannelId};
|
||||
}
|
||||
|
||||
function _fun109218(a0) { // fn#109218, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14628:708, offset: 0x02342198, size: 101 bytes, params: 2, frame: 18
|
||||
const Avatar = (require(1305) /* metro dependency 1305: native */).Avatar;
|
||||
const AvatarSizes = (require(1305) /* metro dependency 1305: native */).AvatarSizes;
|
||||
const XSMALL = AvatarSizes.XSMALL;
|
||||
return (
|
||||
<Avatar
|
||||
size={XSMALL}
|
||||
user={a0}
|
||||
guildId={guildId}
|
||||
animate={false}
|
||||
key={a0.id}
|
||||
/>
|
||||
);
|
||||
}
|
||||
|
||||
function _fun109222() { // fn#109222, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14628:1968, offset: 0x02342514, size: 71 bytes, params: 1, frame: 13
|
||||
var environment;
|
||||
const value = environment.__proto__;
|
||||
const getChannels = GuildChannelStore.getChannels;
|
||||
return Reflect.apply(getChannels, GuildChannelStore, [id])[GUILD_VOCAL_CHANNELS_KEY].filter(function(a0) {
|
||||
return a0.channel.type === ChannelTypes.GUILD_VOICE;
|
||||
}).map(function(a0) {
|
||||
return a0.channel.id;
|
||||
});
|
||||
}
|
||||
|
||||
function _fun109227() { // fn#109227, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14628:2224, offset: 0x023425a9, size: 55 bytes, params: 1, frame: 13
|
||||
var environment;
|
||||
let value = environment.__proto__;
|
||||
value = importDefault(22) /* metro dependency 22 */;
|
||||
return value.flatMap(env0_2, _fun109228);
|
||||
}
|
||||
|
||||
function _fun109230() { // fn#109230, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14628:2431, offset: 0x0234264a, size: 76 bytes, params: 1, frame: 12
|
||||
const env0_0 = null;
|
||||
const env0_1 = null;
|
||||
const Object = global.Object;
|
||||
Object.keys(env0_3).forEach(_fun109231);
|
||||
return {streamingUser: env0_0, streamingChannelId: env0_1};
|
||||
}
|
||||
|
||||
function _fun109228(a0) { // fn#109228, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14628:2248, offset: 0x023425e0, size: 106 bytes, params: 2, frame: 14
|
||||
if (a0 === env1_0.afkChannelId) {
|
||||
return [];
|
||||
}
|
||||
return (require(14420) /* metro dependency 14420: BlockedUserUtils */).filterOutBlockedOrIgnoredUsers((env1_3[a0] ?? []).map(function(a0) {
|
||||
return a0.user;
|
||||
}), env1_4);
|
||||
}
|
||||
|
||||
function _fun109231(a0) { // fn#109231, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14628:2485, offset: 0x02342696, size: 116 bytes, params: 2, frame: 13
|
||||
var environment;
|
||||
var binding;
|
||||
var user;
|
||||
let value = environment.__proto__;
|
||||
if (a0 !== env1_0.afkChannelId) {
|
||||
binding = env1_2;
|
||||
if (binding.includes(a0)) {
|
||||
value = (env1_3[a0] ?? []).find(function(a0) {
|
||||
return a0.voiceState.selfStream;
|
||||
});
|
||||
if (value != null && env0_0 == null) {
|
||||
user = value.user;
|
||||
env0_1 = a0;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user