decord/source/stores/ChannelFollowerStatsStore.tsx

38 lines
1.8 KiB
TypeScript
Raw Normal View History

// Module ID: 11743
// Function ID: 11744
// Name: ChannelFollowerStatsStore
// Dependencies: [504, 573, 2]
2026-07-23 10:11:24 +00:00
// Module 11743 (ChannelFollowerStatsStore)
import initializeDefault from "initialize" /* 504 */;
import DispatcherDefault from "Dispatcher" /* 573 */;
2026-07-20 16:05:17 +00:00
const constants = { FAILED: "failed", SUCCEEDED: "succeeded" };
2026-07-29 08:29:29 +00:00
let closure_1 = {};
2026-08-24 06:08:38 +00:00
const Store = initializeDefault.Store;
2026-07-29 08:29:29 +00:00
class ChannelFollowerStatsStore extends Store {
2026-07-20 16:05:17 +00:00
}
ChannelFollowerStatsStore.prototype["getFollowerStatsForChannel"] = function getFollowerStatsForChannel(arg0) {
return closure_1[arg0];
2026-07-29 08:29:29 +00:00
};
ChannelFollowerStatsStore.displayName = "ChannelFollowerStatsStore";
const channelFollowerStatsStore = new ChannelFollowerStatsStore(DispatcherDefault, {
2026-07-20 16:05:17 +00:00
CONNECTION_OPEN: function handleConnectionOpen() {
2026-08-24 06:08:38 +00:00
closure_1 = {};
2026-07-20 16:05:17 +00:00
},
CHANNEL_FOLLOWER_STATS_FETCH_SUCCESS: function handleFollowerStatsFetchSuccess(stats) {
stats = stats.stats;
if (null == stats) {
stats = {};
}
2026-07-29 08:29:29 +00:00
closure_1[stats.channelId] = { loadingStatus: constants.SUCCEEDED, lastFetched: Date.now(), channelsFollowing: stats.channels_following, guildMembers: stats.guild_members, guildsFollowing: stats.guilds_following, usersSeenEver: stats.users_seen_ever, subscribersGainedSinceLastPost: stats.subscribers_gained_since_last_post, subscribersLostSinceLastPost: stats.subscribers_lost_since_last_post };
2026-07-20 16:05:17 +00:00
},
CHANNEL_FOLLOWER_STATS_FETCH_FAILURE: function handleFollowerStatsFetchFailure(channelId) {
2026-07-29 08:29:29 +00:00
closure_1[channelId.channelId] = { loadingStatus: constants.FAILED, lastFetched: Date.now(), channelsFollowing: 0, guildMembers: 0, guildsFollowing: 0, usersSeenEver: 0, subscribersGainedSinceLastPost: 0, subscribersLostSinceLastPost: 0 };
2026-07-20 16:05:17 +00:00
}
});
const size = fn(2);
const result = size.fileFinishedImporting("stores/ChannelFollowerStatsStore.tsx");
2026-07-20 16:05:17 +00:00
2026-07-29 08:29:29 +00:00
export default channelFollowerStatsStore;