Skipped 1 file(s) >100MB (GitHub limit): source/__polyfill/04xxx/module_4823.js (118.4 MB)
52 lines
1.7 KiB
TypeScript
52 lines
1.7 KiB
TypeScript
// Module ID: 12882
|
|
// Function ID: 12883
|
|
// Name: HubJoinManager
|
|
// Dependencies: [1980, 1074, 1899, 573, 7452, 2]
|
|
|
|
// Module 12882 (HubJoinManager)
|
|
import DispatcherDefault from "Dispatcher" /* 573 */;
|
|
import transitionToGuild from "transitionToGuild" /* 7452 */;
|
|
import GuildStore from "GuildStore" /* 1980 */;
|
|
import LifecycleManager from "LifecycleManager" /* 1899 */;
|
|
|
|
require = fn;
|
|
const GuildFeatures = fn(1074).GuildFeatures;
|
|
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);
|
|
let tmp2 = null != guild;
|
|
if (tmp2) {
|
|
const features = guild.features;
|
|
let hasItem;
|
|
if (features != null) {
|
|
hasItem = features.has(GuildFeatures.HUB);
|
|
}
|
|
tmp2 = hasItem;
|
|
}
|
|
if (tmp2) {
|
|
const onClose = applyArgumentsResult.onClose;
|
|
if (onClose != null) {
|
|
onClose();
|
|
}
|
|
transitionToGuild.transitionToGuild(guild.id);
|
|
}
|
|
};
|
|
return applyArgumentsResult;
|
|
}
|
|
}
|
|
const prototype = HubJoinManager.prototype;
|
|
prototype["_initialize"] = function _initialize(onClose) {
|
|
this.onClose = onClose;
|
|
const subscription = DispatcherDefault.subscribe("GUILD_CREATE", this.handleGuildCreate);
|
|
};
|
|
prototype["_terminate"] = function _terminate() {
|
|
DispatcherDefault.unsubscribe("GUILD_CREATE", this.handleGuildCreate);
|
|
};
|
|
const hubJoinManager = new HubJoinManager();
|
|
const size = fn(2);
|
|
const result = size.fileFinishedImporting("modules/hub/HubJoinManager.tsx");
|
|
|
|
export default hubJoinManager;
|