decord/source/modules/hub/HubJoinManager.tsx

53 lines
1.7 KiB
TypeScript
Raw Normal View History

// Module ID: 12809
// Function ID: 12810
// Name: HubJoinManager
// Dependencies: [1979, 1074, 1898, 573, 7394, 2]
2026-07-20 16:05:17 +00:00
// Module 12809 (HubJoinManager)
import DispatcherDefault from "Dispatcher" /* 573 */;
import transitionToGuild from "transitionToGuild" /* 7394 */;
import GuildStore from "GuildStore" /* 1979 */;
import LifecycleManager from "LifecycleManager" /* 1898 */;
2026-07-23 10:11:24 +00:00
require = fn;
const GuildFeatures = fn(1074).GuildFeatures;
2026-07-29 08:29:29 +00:00
class HubJoinManager extends tmp2 {
constructor() {
applyArgumentsResult = HermesBuiltin.applyArguments(new.target, new.target);
closure_0 = applyArgumentsResult;
applyArgumentsResult.handleGuildCreate = function handleGuildCreate(guild) {
guild = GuildStore.getGuild(guild.guild.id);
2026-07-29 08:29:29 +00:00
let tmp2 = null != guild;
if (tmp2) {
const features = guild.features;
let hasItem;
if (features != null) {
hasItem = features.has(GuildFeatures.HUB);
2026-07-29 08:29:29 +00:00
}
tmp2 = hasItem;
}
if (tmp2) {
const onClose = applyArgumentsResult.onClose;
if (onClose != null) {
onClose();
}
transitionToGuild.transitionToGuild(guild.id);
2026-07-29 08:29:29 +00:00
}
};
return applyArgumentsResult;
2026-07-20 16:05:17 +00:00
}
}
2026-07-29 08:29:29 +00:00
const prototype = HubJoinManager.prototype;
prototype["_initialize"] = function _initialize(onClose) {
this.onClose = onClose;
const subscription = DispatcherDefault.subscribe("GUILD_CREATE", this.handleGuildCreate);
2026-07-29 08:29:29 +00:00
};
prototype["_terminate"] = function _terminate() {
DispatcherDefault.unsubscribe("GUILD_CREATE", this.handleGuildCreate);
2026-07-29 08:29:29 +00:00
};
const hubJoinManager = new HubJoinManager();
const size = fn(2);
const result = size.fileFinishedImporting("modules/hub/HubJoinManager.tsx");
2026-07-20 16:05:17 +00:00
2026-07-29 08:29:29 +00:00
export default hubJoinManager;