2026-10-12 16:32:48 +00:00
|
|
|
// Module ID: 12820
|
|
|
|
|
// Function ID: 12821
|
2026-09-18 19:45:33 +00:00
|
|
|
// Name: ChannelFollowerStatsStore
|
2026-10-07 22:43:51 +00:00
|
|
|
// Dependencies: [504, 584, 2]
|
2026-09-18 19:45:33 +00:00
|
|
|
|
2026-10-12 16:32:48 +00:00
|
|
|
// Module 12820 (ChannelFollowerStatsStore)
|
2026-10-01 14:13:23 +00:00
|
|
|
import get_initializedDefault from "get initialized" /* 504 */;
|
2026-10-07 22:43:51 +00:00
|
|
|
import DispatcherDefault from "Dispatcher" /* 584 */;
|
2026-10-01 14:13:23 +00:00
|
|
|
import size from "module_2" /* 2 */;
|
|
|
|
|
|
|
|
|
|
let closure_1;
|
2026-09-18 19:45:33 +00:00
|
|
|
|
|
|
|
|
const constants = { FAILED: "failed", SUCCEEDED: "succeeded" };
|
2026-10-01 14:13:23 +00:00
|
|
|
const Store = get_initializedDefault.Store;
|
2026-09-18 19:45:33 +00:00
|
|
|
class ChannelFollowerStatsStore extends Store {
|
2026-10-01 14:13:23 +00:00
|
|
|
getFollowerStatsForChannel(arg0) {
|
|
|
|
|
return closure_1[arg0];
|
|
|
|
|
}
|
2026-09-18 19:45:33 +00:00
|
|
|
}
|
2026-10-01 14:13:23 +00:00
|
|
|
const prototype = ChannelFollowerStatsStore.prototype;
|
2026-09-18 19:45:33 +00:00
|
|
|
ChannelFollowerStatsStore.displayName = "ChannelFollowerStatsStore";
|
2026-10-01 14:13:23 +00:00
|
|
|
const obj = {
|
2026-09-18 19:45:33 +00:00
|
|
|
CONNECTION_OPEN: function handleConnectionOpen() {
|
|
|
|
|
closure_1 = {};
|
|
|
|
|
},
|
|
|
|
|
CHANNEL_FOLLOWER_STATS_FETCH_SUCCESS: function handleFollowerStatsFetchSuccess(stats) {
|
|
|
|
|
stats = stats.stats;
|
2026-10-01 14:13:23 +00:00
|
|
|
const channelId = stats.channelId;
|
2026-09-18 19:45:33 +00:00
|
|
|
if (null == stats) {
|
|
|
|
|
stats = {};
|
|
|
|
|
}
|
2026-10-01 14:13:23 +00:00
|
|
|
closure_1[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 };
|
|
|
|
|
({ 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-09-18 19:45:33 +00:00
|
|
|
},
|
|
|
|
|
CHANNEL_FOLLOWER_STATS_FETCH_FAILURE: function handleFollowerStatsFetchFailure(channelId) {
|
|
|
|
|
closure_1[channelId.channelId] = { loadingStatus: constants.FAILED, lastFetched: Date.now(), channelsFollowing: 0, guildMembers: 0, guildsFollowing: 0, usersSeenEver: 0, subscribersGainedSinceLastPost: 0, subscribersLostSinceLastPost: 0 };
|
2026-10-01 14:13:23 +00:00
|
|
|
({ loadingStatus: constants.FAILED, lastFetched: Date.now(), channelsFollowing: 0, guildMembers: 0, guildsFollowing: 0, usersSeenEver: 0, subscribersGainedSinceLastPost: 0, subscribersLostSinceLastPost: 0 });
|
2026-09-18 19:45:33 +00:00
|
|
|
}
|
2026-10-01 14:13:23 +00:00
|
|
|
};
|
|
|
|
|
const channelFollowerStatsStore = new ChannelFollowerStatsStore(DispatcherDefault, obj);
|
2026-09-18 19:45:33 +00:00
|
|
|
const result = size.fileFinishedImporting("stores/ChannelFollowerStatsStore.tsx");
|
|
|
|
|
|
|
|
|
|
export default channelFollowerStatsStore;
|