decord/source/modules/icymi/ICYMIPopularGuildsStore.tsx

67 lines
2 KiB
TypeScript
Raw Normal View History

2026-08-24 06:08:38 +00:00
// Module ID: 15808
// Function ID: 15809
2026-07-29 08:29:29 +00:00
// Name: initialize
2026-08-24 06:08:38 +00:00
// Dependencies: [1910, 1430, 7339, 589, 709, 2]
2026-07-20 16:05:17 +00:00
2026-08-24 06:08:38 +00:00
// Module 15808 (initialize)
import initializeDefault from "initialize" /* 589 */;
import dispatcherDefault from "dispatcher" /* 709 */;
import closure_2 from "createGuildRecordFromRust" /* 1910 */;
2026-07-23 10:11:24 +00:00
const require = arg1;
2026-07-29 08:29:29 +00:00
let closure_3 = [];
let closure_4 = [];
let c5 = 0;
2026-08-24 06:08:38 +00:00
const Store = initializeDefault.Store;
2026-07-29 08:29:29 +00:00
class ICYMIPopularGuildsStore extends Store {
2026-07-20 16:05:17 +00:00
}
2026-07-29 08:29:29 +00:00
const prototype = ICYMIPopularGuildsStore.prototype;
prototype["initialize"] = function initialize() {
2026-08-24 06:08:38 +00:00
this.waitFor(closure_2);
2026-07-29 08:29:29 +00:00
};
prototype["getOnboardingCategoryIds"] = function getOnboardingCategoryIds() {
return closure_3;
};
prototype["getOnboardingGuilds"] = function getOnboardingGuilds() {
return closure_4;
};
prototype["getCurrentOnboardingGuildOffset"] = function getCurrentOnboardingGuildOffset() {
return c5;
};
ICYMIPopularGuildsStore.displayName = "ICYMIPopularGuildsStore";
2026-08-24 06:08:38 +00:00
const iCYMIPopularGuildsStore = new ICYMIPopularGuildsStore(dispatcherDefault, {
2026-07-20 16:05:17 +00:00
LOAD_ICYMI_POPULAR_GUILDS: function loadOnboardingPopularGuilds(categoryIds) {
({ guilds, offset } = categoryIds);
2026-07-23 10:11:24 +00:00
let set;
let set1;
2026-07-20 16:05:17 +00:00
if (0 === offset) {
categoryIds = categoryIds.categoryIds;
2026-07-23 10:11:24 +00:00
let items = [];
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(guildIds.getGuildIds());
2026-07-20 16:05:17 +00:00
const mapped = guilds.map((body) => {
2026-07-29 08:29:29 +00:00
const obj = set(set1[1]);
return obj.fromClientDiscoverableGuild(set(set1[2]).makeDiscoverableGuild(body));
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);
let tmp2 = !hasItem;
if (!hasItem) {
tmp2 = !set.has(id.id);
2026-07-20 16:05:17 +00:00
}
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-08-24 06:08:38 +00:00
const result = require("set").fileFinishedImporting("modules/icymi/ICYMIPopularGuildsStore.tsx");
2026-07-20 16:05:17 +00:00
2026-07-29 08:29:29 +00:00
export default iCYMIPopularGuildsStore;