decord/source/modules/guild_profile/GuildPopoutStore.tsx

70 lines
2.2 KiB
TypeScript
Raw Normal View History

2026-08-08 06:10:11 +00:00
// Module ID: 13315
// Function ID: 13316
2026-07-29 08:29:29 +00:00
// Name: initialize
2026-08-08 06:10:11 +00:00
// Dependencies: [1218, 5956, 589, 709, 2]
2026-07-20 16:05:17 +00:00
2026-08-08 06:10:11 +00:00
// Module 13315 (initialize)
2026-07-29 08:29:29 +00:00
import fetchFingerprint from "fetchFingerprint";
import { Store } from "initialize";
2026-07-23 10:11:24 +00:00
const require = arg1;
2026-07-29 08:29:29 +00:00
let closure_3 = { UNSET: "unset", FETCHING: "fetching", FAILED: "failed", SUCCEEDED: "succeeded" };
let closure_4 = { guilds: {} };
class GuildPopoutStore extends Store {
2026-07-20 16:05:17 +00:00
}
2026-07-29 08:29:29 +00:00
const prototype = GuildPopoutStore.prototype;
prototype["initialize"] = function initialize() {
this.waitFor(fetchFingerprint);
};
prototype["isFetchingGuild"] = function isFetchingGuild(arg0) {
let tmp2 = null != tmp;
if (tmp2) {
tmp2 = tmp.fetchState === constants.FETCHING;
}
return tmp2;
};
prototype["getGuild"] = function getGuild(arg0) {
let guild = null;
if (null != closure_4.guilds[arg0]) {
guild = tmp.guild;
}
return guild;
};
prototype["hasFetchFailed"] = function hasFetchFailed(arg0) {
let tmp2 = null != tmp;
if (tmp2) {
tmp2 = tmp.fetchState === constants.FAILED;
2026-07-20 16:05:17 +00:00
}
2026-07-29 08:29:29 +00:00
return tmp2;
};
GuildPopoutStore.displayName = "GuildPopoutStore";
const guildPopoutStore = new GuildPopoutStore(require("dispatcher"), {
2026-07-20 16:05:17 +00:00
GUILD_POPOUT_FETCH_START: function handleFetchStart(guildId) {
guildId = guildId.guildId;
const obj = {};
2026-07-29 08:29:29 +00:00
const merged = Object.assign(closure_4.guilds[guildId]);
obj.fetchState = constants.FETCHING;
closure_4.guilds[guildId] = obj;
2026-07-20 16:05:17 +00:00
},
GUILD_POPOUT_FETCH_SUCCESS: function handleFetchSuccess(guildId) {
guildId = guildId.guildId;
2026-08-08 06:10:11 +00:00
let obj = require(5956) /* _startLurking */;
2026-07-20 16:05:17 +00:00
obj = {};
const discoverableGuild = obj.makeDiscoverableGuild(guildId.guild);
2026-07-29 08:29:29 +00:00
const merged = Object.assign(closure_4.guilds[guildId]);
obj.guild = discoverableGuild;
obj.fetchState = constants.SUCCEEDED;
closure_4.guilds[guildId] = obj;
2026-07-20 16:05:17 +00:00
},
GUILD_POPOUT_FETCH_FAILURE: function handleFetchFailure(guildId) {
guildId = guildId.guildId;
const obj = {};
2026-07-29 08:29:29 +00:00
const merged = Object.assign(closure_4.guilds[guildId]);
obj.fetchState = constants.FAILED;
closure_4.guilds[guildId] = obj;
2026-07-20 16:05:17 +00:00
}
});
2026-07-29 08:29:29 +00:00
const result = require("initialize").fileFinishedImporting("modules/guild_profile/GuildPopoutStore.tsx");
2026-07-20 16:05:17 +00:00
2026-07-29 08:29:29 +00:00
export default guildPopoutStore;