648 lines
30 KiB
TypeScript
648 lines
30 KiB
TypeScript
/* Metro module 14695; source: modules/guild_sidebar/native/ChannelInfo.tsx; dependencies: [31, 5096, 1867, 3784, 4605, 4297, 661, 33, 4501, 566, 11600, 5102, 9619, 14696, 14697, 4801, 1305, 14699, 14700, 14538, 4809, 11817, 14539, 14701, 10226, 2] */
|
|
function _fun110869(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#110869, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14892:6, offset: 0x0238a5a8, size: 337 bytes, params: 8, frame: 20
|
|
const env0_0 = require;
|
|
const Object = global.Object;
|
|
Object.defineProperty(exports, '__esModule', {value: true});
|
|
importAll(31) /* metro dependency 31 */;
|
|
const newChannelsStore = importDefault(5096) /* metro dependency 5096: NewChannelsStore */;
|
|
const guildStore = importDefault(1867) /* metro dependency 1867: GuildStore */;
|
|
const permissionStore = importDefault(3784) /* metro dependency 3784: PermissionStore */;
|
|
const readStateStore = importDefault(4605) /* metro dependency 4605: ReadStateStore */;
|
|
const voiceStateStore = importDefault(4297) /* metro dependency 4297: VoiceStateStore */;
|
|
let value = require(661) /* metro dependency 661: Constants */;
|
|
const Fonts = value.Fonts;
|
|
const env0_8 = value.GuildFeatures;
|
|
const env0_9 = value.Permissions;
|
|
const env0_10 = (require(33) /* metro dependency 33 */).jsx;
|
|
value = require(4501) /* metro dependency 4501: createStyles */;
|
|
const createStyles = value.createStyles;
|
|
const CODE_NORMAL = Fonts.CODE_NORMAL;
|
|
const env0_11 = Reflect.apply(createStyles, value, [{activeTimestamp: {'fontFamily': null, 'fontSize': 12,
|
|
'lineHeight': 16, fontFamily: CODE_NORMAL}}]);
|
|
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/guild_sidebar/native/ChannelInfo.tsx');
|
|
exports.default = ChannelInfo;
|
|
}
|
|
|
|
function LimitAndDurationInfo({channel, voiceStatesCount, selected}) { // fn#110870, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14892:317, offset: 0x0238a6f9, size: 240 bytes, params: 2, frame: 20
|
|
const {isLocked, hasVideo,
|
|
hasMedia} = (require(566) /* metro dependency 566: flux */).useStateFromStoresObject([VoiceStateStore,
|
|
PermissionStore], _fun110871);
|
|
if ((importDefault(11817) /* metro dependency 11817: useShowConnectedUserLimit */)({channel: channel,
|
|
locked: isLocked, video: hasVideo || hasMedia, selected: selected})) {
|
|
const ConnectedUserLimit = (require(14539) /* metro dependency 14539: ConnectedUserLimit */).ConnectedUserLimit;
|
|
return (
|
|
<ConnectedUserLimit
|
|
userCount={voiceStatesCount}
|
|
video={hasVideo || hasMedia}
|
|
channel={channel}
|
|
/>
|
|
);
|
|
} else {
|
|
return <DurationInfo channel={channel} />;
|
|
}
|
|
}
|
|
|
|
function DurationInfo({channel}) { // fn#110872, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14892:776, offset: 0x0238a872, size: 122 bytes, params: 2, frame: 17
|
|
const styles = useStyles();
|
|
const value2 = (require(14701) /* metro dependency 14701: useVoiceChannelStartTime */).useStartTime(channel);
|
|
if (value2 != null) {
|
|
const ActiveTimestamp = (require(10226) /* metro dependency 10226: Badges */).ActiveTimestamp;
|
|
return <ActiveTimestamp entry={{start: value2}} style={styles.activeTimestamp} />;
|
|
} else {
|
|
return null;
|
|
}
|
|
}
|
|
|
|
function ChannelInfo({channel, isChannelSelected, isChannelCollapsed, voiceStates, enableConnectedUserLimit, enableActivities, muted, isSubscriptionGated, needSubscriptionToAccess}) { // fn#110873, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14892:1027, offset: 0x0238a8ec, size: 698 bytes, params: 2, frame: 32
|
|
var object2;
|
|
var r17;
|
|
var r5;
|
|
var moduleValue4;
|
|
var moduleValue5;
|
|
var ChannelBadge;
|
|
const {guild, mentionsCount, isMentionLowImportance,
|
|
isNewChannel} = (require(566) /* metro dependency 566: flux */).useStateFromStoresObject([GuildStore,
|
|
ReadStateStore, NewChannelsStore], function() {
|
|
var object = {};
|
|
var channelBinding = channel;
|
|
object.guild = GuildStore.getGuild(channelBinding.guild_id);
|
|
object.mentionsCount = ReadStateStore.getMentionCount(channelBinding.id);
|
|
object.isMentionLowImportance = ReadStateStore.getIsMentionLowImportance(channelBinding.id);
|
|
object.isNewChannel = NewChannelsStore.shouldIndicateNewChannel(channelBinding.guild_id, channelBinding.id);
|
|
return object;
|
|
});
|
|
const value4 = (importDefault(11600) /* metro dependency 11600: useEmbeddedAppsForChannel */)(channel);
|
|
const value5 = (require(5102) /* metro dependency 5102: isOptInEnabled */).useOptInEnabledForGuild(channel.guild_id);
|
|
const value6 = (require(9619) /* metro dependency 9619: ForumHooks */).useUnreadThreadsCountForParent(channel.guild_id,
|
|
channel.id);
|
|
const defaultImport = importDefault(14696) /* metro dependency 14696: showChannelBadge */;
|
|
object2 = {mentionsCount: mentionsCount, isNewChannel: isNewChannel, postsWithUnreadsCount: value6, muted: muted};
|
|
if (defaultImport(object2)) {
|
|
ChannelBadge = importDefault(14697) /* metro dependency 14697: ChannelBadge */;
|
|
object2 = {mentionCount: mentionsCount, isMentionLowImportance: isMentionLowImportance};
|
|
r5 = isNewChannel && value5;
|
|
object2.isNewChannel = r5;
|
|
r5 = channel.isForumLikeChannel() ? value6 : null;
|
|
object2.postsWithUnreadsCount = r5;
|
|
object2.muted = muted;
|
|
return <ChannelBadge {...object2} />;
|
|
}
|
|
if (isChannelCollapsed != null) {
|
|
if (isChannelCollapsed) {
|
|
r17 = guild == null ? undefined : guild.features.has(GuildFeatures.COMMUNITY);
|
|
if (r17 == null) {
|
|
if (enableActivities == null) {
|
|
if (isSubscriptionGated == null) {
|
|
if (enableConnectedUserLimit == null) {
|
|
return null;
|
|
}
|
|
if (enableConnectedUserLimit) {
|
|
return (
|
|
<LimitAndDurationInfo
|
|
channel={channel}
|
|
voiceStatesCount={voiceStates?.length ?? 0}
|
|
selected={isChannelSelected}
|
|
/>
|
|
);
|
|
}
|
|
return null;
|
|
}
|
|
if (needSubscriptionToAccess == null) {
|
|
if (enableConnectedUserLimit == null) {
|
|
return null;
|
|
}
|
|
if (enableConnectedUserLimit) {
|
|
return (
|
|
<LimitAndDurationInfo
|
|
channel={channel}
|
|
voiceStatesCount={voiceStates?.length ?? 0}
|
|
selected={isChannelSelected}
|
|
/>
|
|
);
|
|
}
|
|
return null;
|
|
}
|
|
if (isSubscriptionGated) {
|
|
return ((Component) => <Component locked={needSubscriptionToAccess} />)(importDefault(14538) /* metro dependency 14538: GuildRoleSubscriptionGatedChannelIcon */);
|
|
}
|
|
if (enableConnectedUserLimit == null) {
|
|
return null;
|
|
}
|
|
if (enableConnectedUserLimit) {
|
|
return (
|
|
<LimitAndDurationInfo
|
|
channel={channel}
|
|
voiceStatesCount={voiceStates?.length ?? 0}
|
|
selected={isChannelSelected}
|
|
/>
|
|
);
|
|
}
|
|
return null;
|
|
}
|
|
if (enableActivities) {
|
|
moduleValue5 = require(14699) /* metro dependency 14699: showChannelItemEmbeddedActivities */;
|
|
if (moduleValue5.showChannelItemEmbeddedActivities(value4)) {
|
|
return ((Component) => <Component embeddedApps={value4} muted={muted} />)(importDefault(14700) /* metro dependency 14700: ChannelItemEmbeddedActivities */);
|
|
}
|
|
if (isSubscriptionGated == null) {
|
|
if (enableConnectedUserLimit == null) {
|
|
return null;
|
|
}
|
|
if (enableConnectedUserLimit) {
|
|
return (
|
|
<LimitAndDurationInfo
|
|
channel={channel}
|
|
voiceStatesCount={voiceStates?.length ?? 0}
|
|
selected={isChannelSelected}
|
|
/>
|
|
);
|
|
}
|
|
return null;
|
|
}
|
|
if (needSubscriptionToAccess == null) {
|
|
if (enableConnectedUserLimit == null) {
|
|
return null;
|
|
}
|
|
if (enableConnectedUserLimit) {
|
|
return (
|
|
<LimitAndDurationInfo
|
|
channel={channel}
|
|
voiceStatesCount={voiceStates?.length ?? 0}
|
|
selected={isChannelSelected}
|
|
/>
|
|
);
|
|
}
|
|
return null;
|
|
}
|
|
if (isSubscriptionGated) {
|
|
return ((Component) => <Component locked={needSubscriptionToAccess} />)(importDefault(14538) /* metro dependency 14538: GuildRoleSubscriptionGatedChannelIcon */);
|
|
}
|
|
if (enableConnectedUserLimit == null) {
|
|
return null;
|
|
}
|
|
if (enableConnectedUserLimit) {
|
|
return (
|
|
<LimitAndDurationInfo
|
|
channel={channel}
|
|
voiceStatesCount={voiceStates?.length ?? 0}
|
|
selected={isChannelSelected}
|
|
/>
|
|
);
|
|
}
|
|
return null;
|
|
}
|
|
if (isSubscriptionGated == null) {
|
|
if (enableConnectedUserLimit == null) {
|
|
return null;
|
|
}
|
|
if (enableConnectedUserLimit) {
|
|
return (
|
|
<LimitAndDurationInfo
|
|
channel={channel}
|
|
voiceStatesCount={voiceStates?.length ?? 0}
|
|
selected={isChannelSelected}
|
|
/>
|
|
);
|
|
}
|
|
return null;
|
|
}
|
|
if (needSubscriptionToAccess == null) {
|
|
if (enableConnectedUserLimit == null) {
|
|
return null;
|
|
}
|
|
if (enableConnectedUserLimit) {
|
|
return (
|
|
<LimitAndDurationInfo
|
|
channel={channel}
|
|
voiceStatesCount={voiceStates?.length ?? 0}
|
|
selected={isChannelSelected}
|
|
/>
|
|
);
|
|
}
|
|
return null;
|
|
}
|
|
if (isSubscriptionGated) {
|
|
return ((Component) => <Component locked={needSubscriptionToAccess} />)(importDefault(14538) /* metro dependency 14538: GuildRoleSubscriptionGatedChannelIcon */);
|
|
}
|
|
if (enableConnectedUserLimit == null) {
|
|
return null;
|
|
}
|
|
if (enableConnectedUserLimit) {
|
|
return (
|
|
<LimitAndDurationInfo
|
|
channel={channel}
|
|
voiceStatesCount={voiceStates?.length ?? 0}
|
|
selected={isChannelSelected}
|
|
/>
|
|
);
|
|
}
|
|
return null;
|
|
}
|
|
if (r17) {
|
|
moduleValue4 = require(4801) /* metro dependency 4801: ChannelListUtils */;
|
|
if (moduleValue4.hasStream(voiceStates)) {
|
|
const LiveTag = (require(1305) /* metro dependency 1305: native */).LiveTag;
|
|
return <LiveTag />;
|
|
}
|
|
if (enableActivities == null) {
|
|
if (isSubscriptionGated == null) {
|
|
if (enableConnectedUserLimit == null) {
|
|
return null;
|
|
}
|
|
if (enableConnectedUserLimit) {
|
|
return (
|
|
<LimitAndDurationInfo
|
|
channel={channel}
|
|
voiceStatesCount={voiceStates?.length ?? 0}
|
|
selected={isChannelSelected}
|
|
/>
|
|
);
|
|
}
|
|
return null;
|
|
}
|
|
if (needSubscriptionToAccess == null) {
|
|
if (enableConnectedUserLimit == null) {
|
|
return null;
|
|
}
|
|
if (enableConnectedUserLimit) {
|
|
return (
|
|
<LimitAndDurationInfo
|
|
channel={channel}
|
|
voiceStatesCount={voiceStates?.length ?? 0}
|
|
selected={isChannelSelected}
|
|
/>
|
|
);
|
|
}
|
|
return null;
|
|
}
|
|
if (isSubscriptionGated) {
|
|
return ((Component) => <Component locked={needSubscriptionToAccess} />)(importDefault(14538) /* metro dependency 14538: GuildRoleSubscriptionGatedChannelIcon */);
|
|
}
|
|
if (enableConnectedUserLimit == null) {
|
|
return null;
|
|
}
|
|
if (enableConnectedUserLimit) {
|
|
return (
|
|
<LimitAndDurationInfo
|
|
channel={channel}
|
|
voiceStatesCount={voiceStates?.length ?? 0}
|
|
selected={isChannelSelected}
|
|
/>
|
|
);
|
|
}
|
|
return null;
|
|
}
|
|
if (enableActivities) {
|
|
moduleValue5 = require(14699) /* metro dependency 14699: showChannelItemEmbeddedActivities */;
|
|
if (moduleValue5.showChannelItemEmbeddedActivities(value4)) {
|
|
return ((Component) => <Component embeddedApps={value4} muted={muted} />)(importDefault(14700) /* metro dependency 14700: ChannelItemEmbeddedActivities */);
|
|
}
|
|
if (isSubscriptionGated == null) {
|
|
if (enableConnectedUserLimit == null) {
|
|
return null;
|
|
}
|
|
if (enableConnectedUserLimit) {
|
|
return (
|
|
<LimitAndDurationInfo
|
|
channel={channel}
|
|
voiceStatesCount={voiceStates?.length ?? 0}
|
|
selected={isChannelSelected}
|
|
/>
|
|
);
|
|
}
|
|
return null;
|
|
}
|
|
if (needSubscriptionToAccess == null) {
|
|
if (enableConnectedUserLimit == null) {
|
|
return null;
|
|
}
|
|
if (enableConnectedUserLimit) {
|
|
return (
|
|
<LimitAndDurationInfo
|
|
channel={channel}
|
|
voiceStatesCount={voiceStates?.length ?? 0}
|
|
selected={isChannelSelected}
|
|
/>
|
|
);
|
|
}
|
|
return null;
|
|
}
|
|
if (isSubscriptionGated) {
|
|
return ((Component) => <Component locked={needSubscriptionToAccess} />)(importDefault(14538) /* metro dependency 14538: GuildRoleSubscriptionGatedChannelIcon */);
|
|
}
|
|
if (enableConnectedUserLimit == null) {
|
|
return null;
|
|
}
|
|
if (enableConnectedUserLimit) {
|
|
return (
|
|
<LimitAndDurationInfo
|
|
channel={channel}
|
|
voiceStatesCount={voiceStates?.length ?? 0}
|
|
selected={isChannelSelected}
|
|
/>
|
|
);
|
|
}
|
|
return null;
|
|
}
|
|
if (isSubscriptionGated == null) {
|
|
if (enableConnectedUserLimit == null) {
|
|
return null;
|
|
}
|
|
if (enableConnectedUserLimit) {
|
|
return (
|
|
<LimitAndDurationInfo
|
|
channel={channel}
|
|
voiceStatesCount={voiceStates?.length ?? 0}
|
|
selected={isChannelSelected}
|
|
/>
|
|
);
|
|
}
|
|
return null;
|
|
}
|
|
if (needSubscriptionToAccess == null) {
|
|
if (enableConnectedUserLimit == null) {
|
|
return null;
|
|
}
|
|
if (enableConnectedUserLimit) {
|
|
return (
|
|
<LimitAndDurationInfo
|
|
channel={channel}
|
|
voiceStatesCount={voiceStates?.length ?? 0}
|
|
selected={isChannelSelected}
|
|
/>
|
|
);
|
|
}
|
|
return null;
|
|
}
|
|
if (isSubscriptionGated) {
|
|
return ((Component) => <Component locked={needSubscriptionToAccess} />)(importDefault(14538) /* metro dependency 14538: GuildRoleSubscriptionGatedChannelIcon */);
|
|
}
|
|
if (enableConnectedUserLimit == null) {
|
|
return null;
|
|
}
|
|
if (enableConnectedUserLimit) {
|
|
return (
|
|
<LimitAndDurationInfo
|
|
channel={channel}
|
|
voiceStatesCount={voiceStates?.length ?? 0}
|
|
selected={isChannelSelected}
|
|
/>
|
|
);
|
|
}
|
|
return null;
|
|
}
|
|
if (enableActivities == null) {
|
|
if (isSubscriptionGated == null) {
|
|
if (enableConnectedUserLimit == null) {
|
|
return null;
|
|
}
|
|
if (enableConnectedUserLimit) {
|
|
return (
|
|
<LimitAndDurationInfo
|
|
channel={channel}
|
|
voiceStatesCount={voiceStates?.length ?? 0}
|
|
selected={isChannelSelected}
|
|
/>
|
|
);
|
|
}
|
|
return null;
|
|
}
|
|
if (needSubscriptionToAccess == null) {
|
|
if (enableConnectedUserLimit == null) {
|
|
return null;
|
|
}
|
|
if (enableConnectedUserLimit) {
|
|
return (
|
|
<LimitAndDurationInfo
|
|
channel={channel}
|
|
voiceStatesCount={voiceStates?.length ?? 0}
|
|
selected={isChannelSelected}
|
|
/>
|
|
);
|
|
}
|
|
return null;
|
|
}
|
|
if (isSubscriptionGated) {
|
|
return ((Component) => <Component locked={needSubscriptionToAccess} />)(importDefault(14538) /* metro dependency 14538: GuildRoleSubscriptionGatedChannelIcon */);
|
|
}
|
|
if (enableConnectedUserLimit == null) {
|
|
return null;
|
|
}
|
|
if (enableConnectedUserLimit) {
|
|
return (
|
|
<LimitAndDurationInfo
|
|
channel={channel}
|
|
voiceStatesCount={voiceStates?.length ?? 0}
|
|
selected={isChannelSelected}
|
|
/>
|
|
);
|
|
}
|
|
return null;
|
|
}
|
|
if (enableActivities) {
|
|
moduleValue5 = require(14699) /* metro dependency 14699: showChannelItemEmbeddedActivities */;
|
|
if (moduleValue5.showChannelItemEmbeddedActivities(value4)) {
|
|
return ((Component) => <Component embeddedApps={value4} muted={muted} />)(importDefault(14700) /* metro dependency 14700: ChannelItemEmbeddedActivities */);
|
|
}
|
|
if (isSubscriptionGated == null) {
|
|
if (enableConnectedUserLimit == null) {
|
|
return null;
|
|
}
|
|
if (enableConnectedUserLimit) {
|
|
return (
|
|
<LimitAndDurationInfo
|
|
channel={channel}
|
|
voiceStatesCount={voiceStates?.length ?? 0}
|
|
selected={isChannelSelected}
|
|
/>
|
|
);
|
|
}
|
|
return null;
|
|
}
|
|
if (needSubscriptionToAccess == null) {
|
|
if (enableConnectedUserLimit == null) {
|
|
return null;
|
|
}
|
|
if (enableConnectedUserLimit) {
|
|
return (
|
|
<LimitAndDurationInfo
|
|
channel={channel}
|
|
voiceStatesCount={voiceStates?.length ?? 0}
|
|
selected={isChannelSelected}
|
|
/>
|
|
);
|
|
}
|
|
return null;
|
|
}
|
|
if (isSubscriptionGated) {
|
|
return ((Component) => <Component locked={needSubscriptionToAccess} />)(importDefault(14538) /* metro dependency 14538: GuildRoleSubscriptionGatedChannelIcon */);
|
|
}
|
|
if (enableConnectedUserLimit == null) {
|
|
return null;
|
|
}
|
|
if (enableConnectedUserLimit) {
|
|
return (
|
|
<LimitAndDurationInfo
|
|
channel={channel}
|
|
voiceStatesCount={voiceStates?.length ?? 0}
|
|
selected={isChannelSelected}
|
|
/>
|
|
);
|
|
}
|
|
return null;
|
|
}
|
|
if (isSubscriptionGated == null) {
|
|
if (enableConnectedUserLimit == null) {
|
|
return null;
|
|
}
|
|
if (enableConnectedUserLimit) {
|
|
return (
|
|
<LimitAndDurationInfo
|
|
channel={channel}
|
|
voiceStatesCount={voiceStates?.length ?? 0}
|
|
selected={isChannelSelected}
|
|
/>
|
|
);
|
|
}
|
|
return null;
|
|
}
|
|
if (needSubscriptionToAccess == null) {
|
|
if (enableConnectedUserLimit == null) {
|
|
return null;
|
|
}
|
|
if (enableConnectedUserLimit) {
|
|
return (
|
|
<LimitAndDurationInfo
|
|
channel={channel}
|
|
voiceStatesCount={voiceStates?.length ?? 0}
|
|
selected={isChannelSelected}
|
|
/>
|
|
);
|
|
}
|
|
return null;
|
|
}
|
|
if (isSubscriptionGated) {
|
|
return ((Component) => <Component locked={needSubscriptionToAccess} />)(importDefault(14538) /* metro dependency 14538: GuildRoleSubscriptionGatedChannelIcon */);
|
|
}
|
|
if (enableConnectedUserLimit == null) {
|
|
return null;
|
|
}
|
|
if (enableConnectedUserLimit) {
|
|
return (
|
|
<LimitAndDurationInfo
|
|
channel={channel}
|
|
voiceStatesCount={voiceStates?.length ?? 0}
|
|
selected={isChannelSelected}
|
|
/>
|
|
);
|
|
}
|
|
return null;
|
|
}
|
|
}
|
|
if (enableActivities != null) {
|
|
if (enableActivities) {
|
|
moduleValue5 = require(14699) /* metro dependency 14699: showChannelItemEmbeddedActivities */;
|
|
if (moduleValue5.showChannelItemEmbeddedActivities(value4)) {
|
|
return ((Component) => <Component embeddedApps={value4} muted={muted} />)(importDefault(14700) /* metro dependency 14700: ChannelItemEmbeddedActivities */);
|
|
}
|
|
if (isSubscriptionGated == null) {
|
|
if (enableConnectedUserLimit == null) {
|
|
return null;
|
|
}
|
|
if (enableConnectedUserLimit) {
|
|
return (
|
|
<LimitAndDurationInfo
|
|
channel={channel}
|
|
voiceStatesCount={voiceStates?.length ?? 0}
|
|
selected={isChannelSelected}
|
|
/>
|
|
);
|
|
}
|
|
return null;
|
|
}
|
|
if (needSubscriptionToAccess == null) {
|
|
if (enableConnectedUserLimit == null) {
|
|
return null;
|
|
}
|
|
if (enableConnectedUserLimit) {
|
|
return (
|
|
<LimitAndDurationInfo
|
|
channel={channel}
|
|
voiceStatesCount={voiceStates?.length ?? 0}
|
|
selected={isChannelSelected}
|
|
/>
|
|
);
|
|
}
|
|
return null;
|
|
}
|
|
if (isSubscriptionGated) {
|
|
return ((Component) => <Component locked={needSubscriptionToAccess} />)(importDefault(14538) /* metro dependency 14538: GuildRoleSubscriptionGatedChannelIcon */);
|
|
}
|
|
if (enableConnectedUserLimit == null) {
|
|
return null;
|
|
}
|
|
if (enableConnectedUserLimit) {
|
|
return (
|
|
<LimitAndDurationInfo
|
|
channel={channel}
|
|
voiceStatesCount={voiceStates?.length ?? 0}
|
|
selected={isChannelSelected}
|
|
/>
|
|
);
|
|
}
|
|
return null;
|
|
}
|
|
}
|
|
if (isSubscriptionGated != null) {
|
|
if (needSubscriptionToAccess == null) {
|
|
if (enableConnectedUserLimit == null) {
|
|
return null;
|
|
}
|
|
if (enableConnectedUserLimit) {
|
|
return (
|
|
<LimitAndDurationInfo
|
|
channel={channel}
|
|
voiceStatesCount={voiceStates?.length ?? 0}
|
|
selected={isChannelSelected}
|
|
/>
|
|
);
|
|
}
|
|
return null;
|
|
}
|
|
if (isSubscriptionGated) {
|
|
return ((Component) => <Component locked={needSubscriptionToAccess} />)(importDefault(14538) /* metro dependency 14538: GuildRoleSubscriptionGatedChannelIcon */);
|
|
}
|
|
}
|
|
if (enableConnectedUserLimit != null) {
|
|
if (enableConnectedUserLimit) {
|
|
return (
|
|
<LimitAndDurationInfo
|
|
channel={channel}
|
|
voiceStatesCount={voiceStates?.length ?? 0}
|
|
selected={isChannelSelected}
|
|
/>
|
|
);
|
|
}
|
|
}
|
|
return null;
|
|
}
|
|
|
|
function _fun110871() { // fn#110871, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14892:436, offset: 0x0238a7e9, size: 137 bytes, params: 1, frame: 16
|
|
var r1;
|
|
var moduleValue;
|
|
const hasVideo = VoiceStateStore.hasVideo;
|
|
const channelBinding = channel;
|
|
const hasVideo2 = Reflect.apply(hasVideo, VoiceStateStore, [channelBinding.id]);
|
|
const isGuildStageVoice2 = channelBinding.isGuildStageVoice();
|
|
if (isGuildStageVoice2) {
|
|
moduleValue = require(4809) /* metro dependency 4809: StageMediaHooks */;
|
|
r1 = moduleValue.getStageHasMedia(channel.id);
|
|
} else {
|
|
r1 = isGuildStageVoice2;
|
|
}
|
|
const can = PermissionStore.can;
|
|
const CONNECT = Permissions.CONNECT;
|
|
return {isLocked: !Reflect.apply(can, PermissionStore, [CONNECT, channel]), hasVideo: hasVideo2, hasMedia: r1};
|
|
}
|
|
|