Skipped 1 file(s) >100MB (GitHub limit): source/__polyfill/05xxx/module_5014.js (118.4 MB)
94 lines
3.1 KiB
TypeScript
94 lines
3.1 KiB
TypeScript
// Module ID: 6633
|
|
// Function ID: 6634
|
|
// Name: getChannelIdForGuildTransition
|
|
// Dependencies: [2047, 6512, 2044, 4464, 2066, 2098, 6634, 1074, 2051, 6638, 6640, 6642, 5363, 2069, 2]
|
|
// Exports: getChannelIdForGuildTransition
|
|
|
|
// Module 6633 (getChannelIdForGuildTransition)
|
|
import FavoritesUtils from "FavoritesUtils" /* 2069 */;
|
|
import VibegrationsUtils from "VibegrationsUtils" /* 5363 */;
|
|
import OnboardingHomeUtils from "OnboardingHomeUtils" /* 6638 */;
|
|
import SlayerStorefrontUtils from "SlayerStorefrontUtils" /* 6642 */;
|
|
import FavoriteStore from "FavoriteStore" /* 2047 */;
|
|
import GuildOnboardingStore from "GuildOnboardingStore" /* 6512 */;
|
|
import ChannelStore from "ChannelStore" /* 2044 */;
|
|
import GuildChannelStore from "GuildChannelStore" /* 4464 */;
|
|
import GuildStore from "GuildStore" /* 2066 */;
|
|
import SelectedChannelStore from "SelectedChannelStore" /* 2098 */;
|
|
import PrivateChannelSortStore from "PrivateChannelSortStore" /* 6634 */;
|
|
|
|
require = fn;
|
|
const ME = fn(1074).ME;
|
|
const StaticChannelRoute = fn(2051).StaticChannelRoute;
|
|
const size = fn(2);
|
|
const result = size.fileFinishedImporting("modules/routing/getChannelIdForGuildTransition.tsx");
|
|
|
|
export const getChannelIdForGuildTransition = function getChannelIdForGuildTransition(guildId) {
|
|
const channelId = SelectedChannelStore.getChannelId(guildId);
|
|
const defaultChannel = GuildChannelStore.getDefaultChannel(guildId);
|
|
let id;
|
|
if (defaultChannel != null) {
|
|
id = defaultChannel.id;
|
|
}
|
|
if (id == null) {
|
|
let tmp5;
|
|
if (guildId === ME) {
|
|
const privateChannelIds = PrivateChannelSortStore.getPrivateChannelIds();
|
|
let first;
|
|
if (privateChannelIds.length > 0) {
|
|
first = privateChannelIds[0];
|
|
}
|
|
tmp5 = first;
|
|
}
|
|
id = tmp5;
|
|
}
|
|
if (channelId === StaticChannelRoute.GUILD_ONBOARDING) {
|
|
if (!GuildOnboardingStore.shouldShowOnboarding(guildId)) {
|
|
return id;
|
|
}
|
|
}
|
|
if (channelId === StaticChannelRoute.GUILD_HOME) {
|
|
if (!obj.canSeeOnboardingHome(guildId)) {
|
|
return id;
|
|
}
|
|
obj = OnboardingHomeUtils;
|
|
}
|
|
if (channelId === StaticChannelRoute.GUILD_SPACE) {
|
|
if (obj6.canUseGuildSpace(GuildStore.getGuild(guildId), "getChannelIdForGuildTransition")) {
|
|
id = channelId;
|
|
}
|
|
return id;
|
|
} else {
|
|
if (channelId === tmp8.GAME_SHOP) {
|
|
if (obj2.canSeeGameShop(guildId)) {
|
|
return channelId;
|
|
}
|
|
obj2 = SlayerStorefrontUtils;
|
|
}
|
|
if (channelId === tmp8.VIBEGRATIONS) {
|
|
const guild = GuildStore.getGuild(guildId);
|
|
let tmp21 = id;
|
|
if (null != guild) {
|
|
tmp21 = id;
|
|
if (obj5.canAccessVibegrations(guild, "getChannelIdForGuildTransition")) {
|
|
tmp21 = channelId;
|
|
}
|
|
obj5 = VibegrationsUtils;
|
|
}
|
|
return tmp21;
|
|
} else {
|
|
const channel = ChannelStore.getChannel(channelId);
|
|
if (null != channel) {
|
|
if (!channel.isGuildVocal()) {
|
|
let tmp17 = channelId;
|
|
if (obj4.isFavoritesGuildId(guildId)) {
|
|
tmp17 = channelId;
|
|
}
|
|
obj4 = FavoritesUtils;
|
|
}
|
|
return tmp17;
|
|
}
|
|
tmp17 = id;
|
|
}
|
|
}
|
|
};
|