decord/source/modules/games/GameStore.tsx

102 lines
2.7 KiB
TypeScript
Raw Normal View History

2026-07-31 08:44:05 +00:00
// Module ID: 4214
// Function ID: 4215
2026-07-29 08:29:29 +00:00
// Name: map
2026-07-31 08:44:05 +00:00
// Dependencies: [4215, 589, 1467, 709, 2]
2026-07-23 10:11:24 +00:00
2026-07-31 08:44:05 +00:00
// Module 4214 (map)
2026-07-29 08:29:29 +00:00
import applicationId from "applicationId";
import { Store } from "initialize";
import set from "isDiscordProxiedAssetUrl";
2026-07-20 16:05:17 +00:00
2026-07-23 10:11:24 +00:00
let map = new Map();
let set = new Set();
let set1 = new Set();
let set2 = new Set();
2026-07-29 08:29:29 +00:00
class GameStore extends Store {
}
const prototype = GameStore.prototype;
prototype["isFetching"] = function isFetching(arg0) {
return set.has(arg0);
};
prototype["didFetchingFail"] = function didFetchingFail(gameId) {
return set1.has(gameId);
};
prototype["getGame"] = function getGame(gameId) {
return map.get(gameId);
};
prototype["hasNoData"] = function hasNoData(gameId) {
return set2.has(gameId);
};
prototype["getCoverImageUrl"] = function getCoverImageUrl(arg0, size) {
const value = map.get(arg0);
let coverURL;
if (value != null) {
coverURL = value.getCoverURL();
2026-07-20 16:05:17 +00:00
}
2026-07-29 08:29:29 +00:00
if (null == coverURL) {
return null;
} else if (null == size) {
return coverURL;
} else {
let str = importDefault(1467).toURLSafe(coverURL);
str = coverURL;
if (null != str) {
const searchParams = str.searchParams;
const result = searchParams.set("size", size.size.toString());
str = str.toString();
const str2 = size.size;
2026-07-20 16:05:17 +00:00
}
2026-07-29 08:29:29 +00:00
return str;
}
};
GameStore.displayName = "NewGameStore";
const gameStore = new GameStore(require("dispatcher"), {
2026-07-20 16:05:17 +00:00
LOGOUT: function handleLogout() {
const map = new Map();
const set = new Set();
const set1 = new Set();
const set2 = new Set();
},
GAME_FETCH: function handleFetch(gameIds) {
gameIds = gameIds.gameIds;
const item = gameIds.forEach((arg0) => {
2026-07-29 08:29:29 +00:00
set.add(arg0);
set2.delete(arg0);
2026-07-20 16:05:17 +00:00
});
},
2026-07-23 10:11:24 +00:00
GAME_FETCH_CANCELLED: function handleFetchCancelled(gameIds) {
gameIds = gameIds.gameIds;
2026-07-29 08:29:29 +00:00
const item = gameIds.forEach((arg0) => set.delete(arg0));
2026-07-23 10:11:24 +00:00
},
2026-07-20 16:05:17 +00:00
GAME_FETCH_SUCCESS: function handleFetchSuccess(arg0) {
let gameIds;
let games;
({ gameIds, games } = arg0);
2026-07-29 08:29:29 +00:00
let set;
set = new Set(gameIds);
2026-07-20 16:05:17 +00:00
const item = gameIds.forEach((arg0) => {
2026-07-29 08:29:29 +00:00
set2.delete(arg0);
set3.delete(arg0);
2026-07-20 16:05:17 +00:00
});
const item1 = games.forEach((id) => {
set.delete(id.id);
2026-07-29 08:29:29 +00:00
const result = outer1_3.set(id.id, new outer1_2(id));
2026-07-20 16:05:17 +00:00
});
const item2 = set.forEach((arg0) => {
2026-07-29 08:29:29 +00:00
if (!set.has(arg0)) {
set4.add(arg0);
2026-07-20 16:05:17 +00:00
}
});
},
GAME_FETCH_FAILURE: function handleFetchFailure(gameIds) {
gameIds = gameIds.gameIds;
const item = gameIds.forEach((arg0) => {
2026-07-29 08:29:29 +00:00
set.delete(arg0);
set2.add(arg0);
2026-07-20 16:05:17 +00:00
});
}
});
2026-07-23 10:11:24 +00:00
let result = set.fileFinishedImporting("modules/games/GameStore.tsx");
2026-07-20 16:05:17 +00:00
2026-07-29 08:29:29 +00:00
export default gameStore;