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

72 lines
2 KiB
TypeScript
Raw Permalink Normal View History

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