104 lines
5.9 KiB
TypeScript
104 lines
5.9 KiB
TypeScript
/* Metro module 6828; source: modules/routing/getChannelIdForGuildTransition.tsx; dependencies: [6599, 1379, 1935, 1934, 5219, 661, 1386, 5103, 6829, 2] */
|
|
import ChannelStore from '../../stores/ChannelStore.tsx'; /* Metro dependency 1379 */
|
|
import SelectedChannelStore from '../../stores/SelectedChannelStore.tsx'; /* Metro dependency 1934 */
|
|
import GuildChannelStore from '../../stores/GuildChannelStore.tsx'; /* Metro dependency 1935 */
|
|
import PrivateChannelSortStore from '../../stores/views/PrivateChannelSortStore.tsx'; /* Metro dependency 5219 */
|
|
import GuildOnboardingStore from '../guild_onboarding/GuildOnboardingStore.tsx'; /* Metro dependency 6599 */
|
|
import * as FileImportTrackerModule from '../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
|
|
import * as ConstantsModule from '../../Constants.tsx'; /* Metro dependency 661 */
|
|
import * as ChannelConstantsModule from '../channel/ChannelConstants.tsx'; /* Metro dependency 1386 */
|
|
|
|
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});
|
|
(FileImportTrackerModule).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 {
|
|
var guildOnboardingStoreBinding = GuildOnboardingStore;
|
|
if (guildOnboardingStoreBinding.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;
|
|
}
|
|
|
|
}
|
|
|
|
global.__d(_fun53666, 6828, [6599, 1379, 1935, 1934, 5219, 661, 1386, 5103, 6829,
|
|
2]) /* metro module 6828, dependencies: [6599, 1379, 1935, 1934, 5219, 661, 1386, 5103, 6829, 2] */;
|