Files
discord-decomp/sources/lib/guild/GuildChannelSubscriptions.tsx
T
2026-07-28 01:06:53 +03:00

78 lines
4.1 KiB
TypeScript

/* Metro module 6890; source: lib/guild/GuildChannelSubscriptions.tsx; dependencies: [6, 7, 1393, 22, 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 * as FileImportTrackerModule from '../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
function _fun54712(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#54712, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7068:6, offset: 0x0136c7e8, size: 174 bytes, params: 8, frame: 18
const serializeChannelRanges = function(a0) {
a0.forEach(_fun54714);
return {};
};
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const value = _fun54715();
(FileImportTrackerModule).fileFinishedImporting('lib/guild/GuildChannelSubscriptions.tsx');
exports.default = value;
exports.MINIMUM_RANGE = 100;
exports.DEFAULT_RANGES = [[0, 99]];
function serializeChannelRanges(a0) { // fn#54713, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7068:116, offset: 0x0136c896, size: 28 bytes, params: 2, frame: 12
a0.forEach(_fun54714);
return {};
function _fun54714(a0, a1) { // fn#54714, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7068:178, offset: 0x00daaa50, size: 21 bytes, params: 3, frame: 3
env0_0[a1] = a0;
}
}
function _fun54715() { // fn#54715, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7068:204, offset: 0x0136c8b2, size: 147 bytes, params: 1, frame: 15
return CreateClass(GuildChannelSubscriptions, [{key: 'reset', value: function() {
this._subscriptions = {};
}}, {key: 'get', value: value_54718}, {key: '_get', value: value_54719}, {key: 'clear', value: function(a0) {
delete this._subscriptions[a0];
}}, {key: 'subscribe', value: function(a0, a1, a2) {
var r0;
var value = this._get(a0);
var isEqual = importDefault(dependencyMap[3]).isEqual(value.get(a1), a2);
if (isEqual) {
r0 = !isEqual;
} else {
value.set(a1, a2);
this._subscriptions[a0] = value;
this._onChange(a0, serializeChannelRanges(value));
value = true;
r0 = value;
}
return r0;
}}]);
function GuildChannelSubscriptions(a0) { // fn#54716, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7068:225, offset: 0x0136c945, size: 44 bytes, params: 2, frame: 13
env1_2(this, GuildChannelSubscriptions);
this._subscriptions = {};
this._onChange = a0;
}
function value_54718(a0) { // fn#54718, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7068:412, offset: 0x0136c980, size: 33 bytes, params: 2, frame: 12
const value = environment.__proto__;
return serializeChannelRanges(this._get(a0));
}
function value_54719(a0) { // fn#54719, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7068:488, offset: 0x0136c9a1, size: 81 bytes, params: 2, frame: 12
var r0;
var value;
const property = this._subscriptions[a0];
if (property != null) {
r0 = property;
} else {
value = environment.__proto__;
value = importDefault(1393) /* metro dependency 1393 */;
value = new value({max: 5});
r0 = value;
}
return r0;
}
}
}
global.__d(_fun54712, 6890, [6, 7, 1393, 22, 2]) /* metro module 6890, dependencies: [6, 7, 1393, 22, 2] */;