Files
discord-decomp/sources/stores/ChannelFollowerStatsStore.tsx
T
2026-07-28 01:06:53 +03:00

106 lines
5.9 KiB
TypeScript

/* Metro module 11165; source: stores/ChannelFollowerStatsStore.tsx; dependencies: [6, 7, 15, 17, 18, 566, 694, 2] */
import ClassCallCheck from '../by-id/module-00006-ClassCallCheck.js'; /* Metro dependency 6 */
import CreateClass from '../by-id/module-00007-CreateClass.js'; /* Metro dependency 7 */
import PossibleConstructorReturn from '../by-id/module-00015-PossibleConstructorReturn.js'; /* Metro dependency 15 */
import Module00017 from '../by-id/module-00017.js'; /* Metro dependency 17 */
import Inherits from '../by-id/module-00018-Inherits.js'; /* Metro dependency 18 */
import Flux from '../external/discord_common/js/packages/flux/index.tsx'; /* Metro dependency 566 */
import * as FileImportTrackerModule from '../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
function _fun85245(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#85245, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11351:6, offset: 0x01f68d30, size: 327 bytes, params: 8, frame: 18
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
object = {FAILED: 'failed', SUCCEEDED: 'succeeded'};
let env0_6 = {};
const Store = (Flux).Store;
let value = _fun85249(Store);
value.displayName = 'ChannelFollowerStatsStore';
value = new value(importDefault(694) /* metro dependency 694: Dispatcher */, {CONNECTION_OPEN: function() {
env0_6 = {};
}, CHANNEL_FOLLOWER_STATS_FETCH_SUCCESS: CHANNEL_FOLLOWER_STATS_FETCH_SUCCESS,
CHANNEL_FOLLOWER_STATS_FETCH_FAILURE: CHANNEL_FOLLOWER_STATS_FETCH_FAILURE});
(FileImportTrackerModule).fileFinishedImporting('stores/ChannelFollowerStatsStore.tsx');
exports.default = value;
function _isNativeReflectConstruct_85246() { // fn#85246, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11351:148, offset: 0x01f68e77, size: 98 bytes, params: 1, frame: 18
var Boolean;
var prototype;
var valueOf;
var call;
var Reflect;
var construct;
var closure;
var value;
var error;
try {
Boolean = global.Boolean;
prototype = Boolean.prototype;
valueOf = prototype.valueOf;
call = valueOf.call;
Reflect = global.Reflect;
construct = Reflect.construct;
Boolean = global.Boolean;
closure = function() {
};
value = Reflect.apply(construct, Reflect, [Boolean, [], closure]);
value = Reflect.apply(call, valueOf, [value]);
var result = !value;
} catch (error) {
}
return (_isNativeReflectConstruct_85246_isNativeReflectConstruct = function() {
return !!result;
})();
}
function _fun85249(a0) { // fn#85249, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11351:429, offset: 0x01f68ed9, size: 74 bytes, params: 2, frame: 15
const ChannelFollowerStatsStore2 = ChannelFollowerStatsStore;
Inherits(ChannelFollowerStatsStore2, a0);
return CreateClass(ChannelFollowerStatsStore2, [{key: 'getFollowerStatsForChannel', value: value_85251}]);
function ChannelFollowerStatsStore() { // fn#85250, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11351:441, offset: 0x00e3db8d, size: 113 bytes, params: 1, frame: 20
const value = environment.__proto__;
env1_0(this, ChannelFollowerStatsStore);
const value3 = env1_3(ChannelFollowerStatsStore);
return env1_2(this, _isNativeReflectConstruct_85246() ? global.Reflect.construct(value3, arguments,
env1_3(this).constructor) : value3.apply(this, arguments));
}
function value_85251(a0) { // fn#85251, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11351:800, offset: 0x00fbe09c, size: 16 bytes, params: 2, frame: 2
return env1_6[a0];
}
}
function CHANNEL_FOLLOWER_STATS_FETCH_SUCCESS({channelId, stats}) { // fn#85253, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11351:998, offset: 0x01f68f23, size: 154 bytes, params: 2, frame: 13
const r3 = stats ?? ({});
const binding = env0_6;
const object = {};
const SUCCEEDED = env0_5.SUCCEEDED;
object.loadingStatus = SUCCEEDED;
const Date = global.Date;
object.lastFetched = Date.now();
object.channelsFollowing = r3.channels_following;
object.guildMembers = r3.guild_members;
object.guildsFollowing = r3.guilds_following;
const users_seen_ever = r3.users_seen_ever;
object.usersSeenEver = users_seen_ever;
object.subscribersGainedSinceLastPost = r3.subscribers_gained_since_last_post;
object.subscribersLostSinceLastPost = r3.subscribers_lost_since_last_post;
binding[channelId] = object;
}
function CHANNEL_FOLLOWER_STATS_FETCH_FAILURE({channelId}) { // fn#85254, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11351:1438, offset: 0x01f68fbd, size: 76 bytes, params: 2, frame: 12
const binding = env0_6;
const object = {'loadingStatus': null, 'lastFetched': null, 'channelsFollowing': 0, 'guildMembers': 0,
'guildsFollowing': 0, 'usersSeenEver': 0, 'subscribersGainedSinceLastPost': 0,
'subscribersLostSinceLastPost': 0};
const FAILED = env0_5.FAILED;
object.loadingStatus = FAILED;
const Date = global.Date;
object.lastFetched = Date.now();
binding[channelId] = object;
}
}
global.__d(_fun85245, 11165, [6, 7, 15, 17, 18, 566, 694,
2]) /* metro module 11165, dependencies: [6, 7, 15, 17, 18, 566, 694, 2] */;