97 lines
5.0 KiB
TypeScript
97 lines
5.0 KiB
TypeScript
/* Metro module 6828; source: modules/routing/getChannelIdForGuildTransition.tsx; dependencies: [6599, 1379, 1935, 1934, 5219, 661, 1386, 5103, 6829, 2] */
|
|
function _fun53666(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#53666, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7006:6, offset: 0x01352bb6, size: 220 bytes, params: 8, frame: 19
|
|
const env0_0 = require;
|
|
const Object = global.Object;
|
|
Object.defineProperty(exports, '__esModule', {value: true});
|
|
const guildOnboardingStore = importDefault(6599) /* metro dependency 6599: GuildOnboardingStore */;
|
|
const channelStore = importDefault(1379) /* metro dependency 1379: ChannelStore */;
|
|
const guildChannelStore = importDefault(1935) /* metro dependency 1935: GuildChannelStore */;
|
|
const selectedChannelStore = importDefault(1934) /* metro dependency 1934: SelectedChannelStore */;
|
|
const privateChannelSortStore = importDefault(5219) /* metro dependency 5219: PrivateChannelSortStore */;
|
|
const env0_7 = (require(661) /* metro dependency 661: Constants */).ME;
|
|
const env0_8 = (require(1386) /* metro dependency 1386: ChannelConstants */).StaticChannelRoute;
|
|
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/routing/getChannelIdForGuildTransition.tsx');
|
|
exports.getChannelIdForGuildTransition = getChannelIdForGuildTransition;
|
|
}
|
|
|
|
function getChannelIdForGuildTransition(a0) { // fn#53667, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7006:305, offset: 0x01352c92, size: 281 bytes, params: 2, frame: 19
|
|
var r4;
|
|
var r2;
|
|
var privateChannelIds;
|
|
var moduleValue;
|
|
var moduleValue2;
|
|
var channel;
|
|
const channelId = SelectedChannelStore.getChannelId(a0);
|
|
const defaultChannel = GuildChannelStore.getDefaultChannel(a0);
|
|
const value4 = undefined;
|
|
const id = defaultChannel == null ? value4 : defaultChannel.id;
|
|
if (id != null) {
|
|
r2 = id;
|
|
} else {
|
|
if (a0 !== ME) {
|
|
r4 = value4;
|
|
} else {
|
|
privateChannelIds = PrivateChannelSortStore.getPrivateChannelIds();
|
|
r4 = privateChannelIds.length > 0 ? privateChannelIds[0] : value4;
|
|
}
|
|
r2 = r4;
|
|
}
|
|
const GUILD_ONBOARDING = StaticChannelRoute.GUILD_ONBOARDING;
|
|
if (channelId !== GUILD_ONBOARDING) {
|
|
if (channelId !== StaticChannelRoute.GUILD_HOME) {
|
|
if (channelId !== StaticChannelRoute.GAME_SHOP) {
|
|
channel = ChannelStore.getChannel(channelId);
|
|
return channel == null || channel.isGuildVocal() ? r2 : channelId;
|
|
}
|
|
moduleValue2 = require(6829) /* metro dependency 6829: SlayerStorefrontUtils */;
|
|
if (moduleValue2.canSeeGameShop(a0)) {
|
|
return channelId;
|
|
}
|
|
channel = ChannelStore.getChannel(channelId);
|
|
return channel == null || channel.isGuildVocal() ? r2 : channelId;
|
|
}
|
|
moduleValue = require(5103) /* metro dependency 5103: OnboardingHomeUtils */;
|
|
if (moduleValue.canSeeOnboardingHome(a0)) {
|
|
if (channelId !== StaticChannelRoute.GAME_SHOP) {
|
|
channel = ChannelStore.getChannel(channelId);
|
|
return channel == null || channel.isGuildVocal() ? r2 : channelId;
|
|
}
|
|
moduleValue2 = require(6829) /* metro dependency 6829: SlayerStorefrontUtils */;
|
|
if (moduleValue2.canSeeGameShop(a0)) {
|
|
return channelId;
|
|
}
|
|
channel = ChannelStore.getChannel(channelId);
|
|
return channel == null || channel.isGuildVocal() ? r2 : channelId;
|
|
}
|
|
} else if (GuildOnboardingStore.shouldShowOnboarding(a0)) {
|
|
if (channelId !== StaticChannelRoute.GUILD_HOME) {
|
|
if (channelId !== StaticChannelRoute.GAME_SHOP) {
|
|
channel = ChannelStore.getChannel(channelId);
|
|
return channel == null || channel.isGuildVocal() ? r2 : channelId;
|
|
}
|
|
moduleValue2 = require(6829) /* metro dependency 6829: SlayerStorefrontUtils */;
|
|
if (moduleValue2.canSeeGameShop(a0)) {
|
|
return channelId;
|
|
}
|
|
channel = ChannelStore.getChannel(channelId);
|
|
return channel == null || channel.isGuildVocal() ? r2 : channelId;
|
|
}
|
|
moduleValue = require(5103) /* metro dependency 5103: OnboardingHomeUtils */;
|
|
if (moduleValue.canSeeOnboardingHome(a0)) {
|
|
if (channelId !== StaticChannelRoute.GAME_SHOP) {
|
|
channel = ChannelStore.getChannel(channelId);
|
|
return channel == null || channel.isGuildVocal() ? r2 : channelId;
|
|
}
|
|
moduleValue2 = require(6829) /* metro dependency 6829: SlayerStorefrontUtils */;
|
|
if (moduleValue2.canSeeGameShop(a0)) {
|
|
return channelId;
|
|
}
|
|
channel = ChannelStore.getChannel(channelId);
|
|
return channel == null || channel.isGuildVocal() ? r2 : channelId;
|
|
}
|
|
return r2;
|
|
}
|
|
return r2;
|
|
}
|
|
|