112 lines
3.0 KiB
TypeScript
112 lines
3.0 KiB
TypeScript
// Metro module 8482 (f8483).
|
|
import Module589 from "../../_bundle/Module589";
|
|
import Dispatcher from "../../Dispatcher";
|
|
let c5432_0 = {};
|
|
let c5432_1 = {};
|
|
let c5432_2 = {};
|
|
let c5432_3 = {};
|
|
let c5432_4 = {};
|
|
let c5432_5 = {};
|
|
let c5432_6 = {};
|
|
let c5432_7 = null;
|
|
class GameProfileStore extends Module589.Store {
|
|
static displayName = "GameProfileStore";
|
|
getSimilarGames(a0) {
|
|
return c5432_0[a0];
|
|
}
|
|
getShopCollectionSkuIds(a0) {
|
|
return c5432_1[a0];
|
|
}
|
|
hasShopCollectionBeenFetched(a0) {
|
|
let r4 = c5432_2[a0];
|
|
if (r4 == null) {
|
|
r4 = false;
|
|
}
|
|
return r4;
|
|
}
|
|
isShopCollectionFetching(a0) {
|
|
let r4 = c5432_3[a0];
|
|
if (r4 == null) {
|
|
r4 = false;
|
|
}
|
|
return r4;
|
|
}
|
|
getAnnouncements(a0) {
|
|
return c5432_4[a0];
|
|
}
|
|
hasAnnouncementsBeenFetched(a0) {
|
|
let r4 = c5432_5[a0];
|
|
if (r4 == null) {
|
|
r4 = false;
|
|
}
|
|
return r4;
|
|
}
|
|
isAnnouncementsFetching(a0) {
|
|
let r4 = c5432_6[a0];
|
|
if (r4 == null) {
|
|
r4 = false;
|
|
}
|
|
return r4;
|
|
}
|
|
getPendingReturn() {
|
|
return c5432_7;
|
|
}
|
|
}
|
|
const gameProfileStore = new GameProfileStore(Dispatcher, {
|
|
GAME_PROFILE_GET_SIMILAR_GAMES_SUCCESS: function handleGetSimilarGamesSuccess(a0) {
|
|
c5432_0[a0.gameId] = a0.games;
|
|
},
|
|
GAME_PROFILE_GET_SHOP_COLLECTION_START: function handleGetShopCollectionStart(a0) {
|
|
c5432_3[a0.collectionId] = true;
|
|
},
|
|
GAME_PROFILE_GET_SHOP_COLLECTION_SUCCESS: function handleGetShopCollectionSuccess(a0) {
|
|
const collectionId = a0.collectionId;
|
|
c5432_1[collectionId] = a0.skuIds;
|
|
c5432_2[collectionId] = true;
|
|
c5432_3[collectionId] = false;
|
|
},
|
|
GAME_PROFILE_GET_SHOP_COLLECTION_ERROR: function handleGetShopCollectionError({ collectionId }) {
|
|
c5432_2[collectionId] = true;
|
|
c5432_3[collectionId] = false;
|
|
},
|
|
GAME_PROFILE_GET_ANNOUNCEMENTS_START: function handleGetAnnouncementsStart(a0) {
|
|
c5432_6[a0.gameId] = true;
|
|
},
|
|
GAME_PROFILE_GET_ANNOUNCEMENTS_SUCCESS: function handleGetAnnouncementsSuccess(a0) {
|
|
const gameId = a0.gameId;
|
|
c5432_4[gameId] = {
|
|
messages: a0.messages,
|
|
channelId: a0.channelId,
|
|
guildId: a0.guildId
|
|
};
|
|
c5432_5[gameId] = true;
|
|
c5432_6[gameId] = false;
|
|
},
|
|
GAME_PROFILE_GET_ANNOUNCEMENTS_ERROR: function handleGetAnnouncementsError({ gameId }) {
|
|
c5432_5[gameId] = true;
|
|
c5432_6[gameId] = false;
|
|
},
|
|
GAME_PROFILE_SET_PENDING_RETURN: function handleSetPendingReturn({ gameId, channelId, initialScrollOffset }) {
|
|
if (c5432_7?.gameId === gameId) {
|
|
if (c5432_7?.channelId === channelId) {
|
|
if (c5432_7?.initialScrollOffset === initialScrollOffset) {
|
|
return false;
|
|
}
|
|
}
|
|
}
|
|
c5432_7 = {
|
|
gameId,
|
|
channelId,
|
|
initialScrollOffset
|
|
};
|
|
},
|
|
GAME_PROFILE_CLEAR_PENDING_RETURN: function handleClearPendingReturn({ gameId }) {
|
|
if (c5432_7 != null && c5432_7.gameId === gameId) {
|
|
c5432_7 = null;
|
|
return void 0;
|
|
}
|
|
return false;
|
|
}
|
|
});
|
|
export default gameProfileStore;
|