79 lines
2.5 KiB
TypeScript
79 lines
2.5 KiB
TypeScript
// Module ID: 5945
|
|
// Function ID: 5946
|
|
// Name: getChannelIdForGuildTransition
|
|
// Dependencies: [1394, 5344, 1391, 1982, 1910, 1981, 5946, 676, 1398, 5950, 5952, 5954, 1913, 2]
|
|
// Exports: getChannelIdForGuildTransition
|
|
|
|
// Module 5945 (getChannelIdForGuildTransition)
|
|
import getFavoritesAwareGuildName from "getFavoritesAwareGuildName" /* 1913 */;
|
|
import useCanSeeOnboardingHome from "useCanSeeOnboardingHome" /* 5950 */;
|
|
import getPrice from "getPrice" /* 5954 */;
|
|
import closure_2 from "initializeFromUserSettings" /* 1394 */;
|
|
import closure_3 from "shouldShowOnboarding" /* 5344 */;
|
|
import closure_4 from "ensureGuildLoaded" /* 1391 */;
|
|
import closure_5 from "comparator" /* 1982 */;
|
|
import closure_6 from "createGuildRecordFromRust" /* 1910 */;
|
|
import closure_7 from "handleConnectionOpen" /* 1981 */;
|
|
import closure_8 from "makeSortedChannel" /* 5946 */;
|
|
import { ME } from "ME" /* 676 */;
|
|
import { StaticChannelRoute } from "set" /* 1398 */;
|
|
|
|
require = arg1;
|
|
const result = require("set").fileFinishedImporting("modules/routing/getChannelIdForGuildTransition.tsx");
|
|
|
|
export const getChannelIdForGuildTransition = function getChannelIdForGuildTransition(guildId) {
|
|
channelId = channelId.getChannelId(guildId);
|
|
defaultChannel = defaultChannel.getDefaultChannel(guildId);
|
|
let id;
|
|
if (defaultChannel != null) {
|
|
id = defaultChannel.id;
|
|
}
|
|
if (id == null) {
|
|
let tmp5;
|
|
if (guildId === ME) {
|
|
privateChannelIds = privateChannelIds.getPrivateChannelIds();
|
|
let first;
|
|
if (privateChannelIds.length > 0) {
|
|
first = privateChannelIds[0];
|
|
}
|
|
tmp5 = first;
|
|
}
|
|
id = tmp5;
|
|
}
|
|
if (channelId === StaticChannelRoute.GUILD_ONBOARDING) {
|
|
if (!closure_3.shouldShowOnboarding(guildId)) {
|
|
return id;
|
|
}
|
|
}
|
|
if (channelId === StaticChannelRoute.GUILD_HOME) {
|
|
if (!obj.canSeeOnboardingHome(guildId)) {
|
|
return id;
|
|
}
|
|
obj = useCanSeeOnboardingHome;
|
|
}
|
|
if (channelId === StaticChannelRoute.GUILD_SPACE) {
|
|
if (obj5.canUseGuildSpace(guild.getGuild(guildId), "getChannelIdForGuildTransition")) {
|
|
id = channelId;
|
|
}
|
|
return id;
|
|
} else {
|
|
if (channelId === tmp8.GAME_SHOP) {
|
|
if (obj2.canSeeGameShop(guildId)) {
|
|
return channelId;
|
|
}
|
|
obj2 = getPrice;
|
|
}
|
|
channel = channel.getChannel(channelId);
|
|
if (null != channel) {
|
|
if (!channel.isGuildVocal()) {
|
|
let tmp17 = channelId;
|
|
if (obj4.isFavoritesGuildId(guildId)) {
|
|
tmp17 = channelId;
|
|
}
|
|
obj4 = getFavoritesAwareGuildName;
|
|
}
|
|
return tmp17;
|
|
}
|
|
tmp17 = id;
|
|
}
|
|
};
|