decord/beta/source/modules/icymi/ICYMIPopularGuildsStore.tsx

72 lines
2 KiB
TypeScript
Raw Permalink Normal View History

2026-10-12 16:32:48 +00:00
// Module ID: 16945
// Function ID: 16946
// Name: ICYMIPopularGuildsStore
2026-10-12 16:32:48 +00:00
// Dependencies: [2087, 2079, 7052, 504, 584, 2]
2026-10-12 16:32:48 +00:00
// Module 16945 (ICYMIPopularGuildsStore)
2026-10-01 14:13:23 +00:00
import get_initializedDefault from "get initialized" /* 504 */;
2026-10-07 22:43:51 +00:00
import DispatcherDefault from "Dispatcher" /* 584 */;
2026-10-12 16:32:48 +00:00
import GuildStore from "GuildStore" /* 2087 */;
2026-10-01 14:13:23 +00:00
import size from "module_2" /* 2 */;
let set;
let closure_3 = [];
let closure_4 = [];
let c5 = 0;
2026-10-01 14:13:23 +00:00
const Store = get_initializedDefault.Store;
class ICYMIPopularGuildsStore extends Store {
2026-10-01 14:13:23 +00:00
initialize() {
this.waitFor(GuildStore);
}
getOnboardingCategoryIds() {
return closure_3;
}
getOnboardingGuilds() {
return closure_4;
}
getCurrentOnboardingGuildOffset() {
return c5;
}
}
const prototype = ICYMIPopularGuildsStore.prototype;
ICYMIPopularGuildsStore.displayName = "ICYMIPopularGuildsStore";
2026-10-01 14:13:23 +00:00
let obj = {
LOAD_ICYMI_POPULAR_GUILDS: function loadOnboardingPopularGuilds(categoryIds) {
2026-10-01 14:13:23 +00:00
let guilds;
let items;
let offset;
({ guilds, offset } = categoryIds);
2026-10-01 14:13:23 +00:00
set = undefined;
let set1;
if (0 === offset) {
categoryIds = categoryIds.categoryIds;
2026-10-01 14:13:23 +00:00
items = [];
offset = 0;
}
set = new Set(items.map((id) => id.id));
set1 = new Set(GuildStore.getGuildIds());
const mapped = guilds.map((item) => {
2026-10-01 14:13:23 +00:00
const fromClientDiscoverableGuild = set(set1[1]).fromClientDiscoverableGuild;
set(set1[1]);
const obj = set(set1[2]);
return fromClientDiscoverableGuild(obj.makeDiscoverableGuild(item));
});
const found = mapped.filter((id) => {
const hasItem = set1.has(id.id);
2026-10-01 14:13:23 +00:00
const tmp2 = !hasItem && !set.has(id.id);
return tmp2;
});
items = [...found];
},
LOGOUT: function handleLogout() {
closure_3 = [];
closure_4 = [];
c5 = 0;
}
2026-10-01 14:13:23 +00:00
};
const iCYMIPopularGuildsStore = new ICYMIPopularGuildsStore(DispatcherDefault, obj);
const result = size.fileFinishedImporting("modules/icymi/ICYMIPopularGuildsStore.tsx");
export default iCYMIPopularGuildsStore;