Files
discord-decomp/sources/modules/channel/ChannelMemberCountStore.tsx
T
2026-07-28 01:06:53 +03:00

119 lines
6.8 KiB
TypeScript

/* Metro module 9724; source: modules/channel/ChannelMemberCountStore.tsx; dependencies: [6, 7, 15, 17, 18, 4257, 1379, 21, 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 SnowflakeUtils from '../../utils/SnowflakeUtils.tsx'; /* Metro dependency 21 */
import Flux from '../../external/discord_common/js/packages/flux/index.tsx'; /* Metro dependency 566 */
import ChannelStore from '../../stores/ChannelStore.tsx'; /* Metro dependency 1379 */
import GatewayConnectionStore from '../gateway/GatewayConnectionStore.tsx'; /* Metro dependency 4257 */
import * as FileImportTrackerModule from '../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
function _fun76400(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#76400, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9910:6, offset: 0x01dce548, size: 384 bytes, params: 8, frame: 19
let Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
Object = global.Object;
const env0_9 = Object.freeze({'online': null, 'total': null});
const env0_10 = {};
const env0_11 = {};
const PersistedStore = (Flux).PersistedStore;
let value = _fun76404(PersistedStore);
value.displayName = 'ChannelMemberCountStore';
value.persistKey = 'channelMemberCounts';
value = new value(importDefault(694) /* metro dependency 694: Dispatcher */,
{CONNECTION_OPEN: CONNECTION_OPEN_76410, CHANNEL_MEMBER_COUNT_UPDATE: CHANNEL_MEMBER_COUNT_UPDATE});
(FileImportTrackerModule).fileFinishedImporting('modules/channel/ChannelMemberCountStore.tsx');
exports.default = value;
function _isNativeReflectConstruct_76401() { // fn#76401, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9910:168, offset: 0x01dce6c8, 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_76401_isNativeReflectConstruct = function() {
return !!result;
})();
}
function _fun76404(a0) { // fn#76404, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9910:430, offset: 0x01dce72a, size: 147 bytes, params: 2, frame: 16
const ChannelMemberCountStore2 = ChannelMemberCountStore;
Inherits(ChannelMemberCountStore2, a0);
return CreateClass(ChannelMemberCountStore2, [{key: 'initialize', value: value_76406}, {key: 'getState',
value: value_76407}, {key: 'getMemberCount', value: value_76408}, {key: 'requestCount', value: value_76409}]);
function ChannelMemberCountStore() { // fn#76405, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9910:442, offset: 0x00ea76ec, size: 113 bytes, params: 1, frame: 20
const value = environment.__proto__;
env1_2(this, ChannelMemberCountStore);
const value3 = env1_5(ChannelMemberCountStore);
return env1_4(this, _isNativeReflectConstruct_76401() ? global.Reflect.construct(value3, arguments,
env1_5(this).constructor) : value3.apply(this, arguments));
}
function value_76406(a0) { // fn#76406, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9910:775, offset: 0x01dce7bd, size: 47 bytes, params: 2, frame: 15
const value = a0;
this.waitFor(GatewayConnectionStore, ChannelStore);
env1_11 = value ?? env1_10;
}
function value_76407() { // fn#76407, offset: 0x00ef8482, size: 9 bytes, params: 1, frame: 1
return env1_11;
}
function value_76408(a0) { // fn#76408, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9910:893, offset: 0x01dce7ec, size: 26 bytes, params: 2, frame: 3
return env1_11[a0] ?? env1_9;
}
function value_76409(a0, a1) { // fn#76409, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9910:965, offset: 0x01dce806, size: 53 bytes, params: 3, frame: 13
const object = {guildId: a0, channelId: a1};
const value = environment.__proto__;
GatewayConnectionStore.getSocket().requestChannelMemberCount(a0, a1);
}
}
function CONNECTION_OPEN_76410() { // fn#76410, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9910:1191, offset: 0x01dce83b, size: 114 bytes, params: 1, frame: 14
var socket;
if (env0_12 != null) {
socket = GatewayConnectionStore.getSocket();
socket.requestChannelMemberCount(env0_12.guildId, env0_12.channelId);
}
(SnowflakeUtils).keys(env0_11).forEach(_fun76411);
function _fun76411(a0) { // fn#76411, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9910:1320, offset: 0x013c6b1b, size: 38 bytes, params: 2, frame: 12
if (ChannelStore.getChannel(a0) == null) {
delete env1_11[a0];
}
}
}
function CHANNEL_MEMBER_COUNT_UPDATE({channelId, online, total}) { // fn#76412, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9910:1391, offset: 0x01dce8ad, size: 63 bytes, params: 2, frame: 6
if (!(online == null && total == null)) {
env0_11[channelId] = {online: online, total: total};
}
return true;
}
}
global.__d(_fun76400, 9724, [6, 7, 15, 17, 18, 4257, 1379, 21, 566, 694,
2]) /* metro module 9724, dependencies: [6, 7, 15, 17, 18, 4257, 1379, 21, 566, 694, 2] */;