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

112 lines
6.1 KiB
TypeScript

/* Metro module 6903; source: actions/GuildSubscriptionsActionCreators.tsx; dependencies: [694, 6890, 2] */
import Dispatcher from '../Dispatcher.tsx'; /* Metro dependency 694 */
import * as FileImportTrackerModule from '../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as GuildChannelSubscriptionsModule from '../lib/guild/GuildChannelSubscriptions.tsx'; /* Metro dependency 6890 */
function _fun54925(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#54925, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7081:6, offset: 0x0137113b, size: 171 bytes, params: 8, frame: 19
const env0_0 = require;
const subscribeChannel2 = subscribeChannel;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
(FileImportTrackerModule).fileFinishedImporting('actions/GuildSubscriptionsActionCreators.tsx');
exports.subscribeMembers = subscribeMembers;
exports.unsubscribeMembers = unsubscribeMembers;
exports.subscribeToMemberUpdates = subscribeToMemberUpdates;
exports.unsubscribeFromMemberUpdates = unsubscribeFromMemberUpdates;
exports.subscribeGuild = subscribeGuild;
exports.subscribeChannel = subscribeChannel2;
exports.subscribeChannelDimensions = subscribeChannelDimensions;
function subscribeChannel(a0, a1, a2) { // fn#54926, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7081:43, offset: 0x013711e6, size: 70 bytes, params: 4, frame: 13
(Dispatcher).dispatch({type: 'GUILD_SUBSCRIPTIONS_CHANNEL',
guildId: a0, channelId: a1, ranges: a2});
}
function subscribeMembers(a0, a1) { // fn#54927, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7081:308, offset: 0x0137122c, size: 63 bytes, params: 3, frame: 13
(Dispatcher).dispatch({type: 'GUILD_SUBSCRIPTIONS_MEMBERS_ADD',
guildId: a0, userIds: a1});
}
function unsubscribeMembers(a0, a1) { // fn#54928, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7081:440, offset: 0x0137126b, size: 63 bytes, params: 3, frame: 13
(Dispatcher).dispatch({type: 'GUILD_SUBSCRIPTIONS_MEMBERS_REMOVE',
guildId: a0, userIds: a1});
}
function subscribeToMemberUpdates(a0) { // fn#54929, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7081:583, offset: 0x013712aa, size: 55 bytes, params: 2, frame: 13
(Dispatcher).dispatch({type: 'GUILD_SUBSCRIPTIONS_ADD_MEMBER_UPDATES',
guildId: a0});
}
function unsubscribeFromMemberUpdates(a0) { // fn#54930, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7081:728, offset: 0x013712e1, size: 55 bytes, params: 2, frame: 13
(Dispatcher).dispatch({type: 'GUILD_SUBSCRIPTIONS_REMOVE_MEMBER_UPDATES',
guildId: a0});
}
function subscribeGuild(a0) { // fn#54931, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7081:866, offset: 0x01371318, size: 53 bytes, params: 2, frame: 13
(Dispatcher).dispatch({type: 'GUILD_SUBSCRIPTIONS', guildId: a0});
}
function subscribeChannelDimensions({guildId, channelId, y, height, rowHeight}) { // fn#54932, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7081:1016, offset: 0x0137134d, size: 223 bytes, params: 2, frame: 24
var r13;
var r5;
var Math;
var max;
var value3;
var value7;
const toIndex2 = toIndex;
const pushRange2 = pushRange;
let value = toIndex2(0.5 * height);
const value2 = toIndex2(y, -value);
value = toIndex2(y + height, value);
reducibleJoin2: while (true) {
if (value2 > 0) {
Math = global.Math;
max = Math.max;
value3 = Reflect.apply(max, Math, [pushRange2(0), value2]);
r13 = value3;
break reducibleJoin2;
}
r13 = value2;
break reducibleJoin2;
}
Math = global.Math;
const floor = Math.floor;
const MINIMUM_RANGE = (GuildChannelSubscriptionsModule).MINIMUM_RANGE;
const value6 = Reflect.apply(floor, Math, [r13 / MINIMUM_RANGE]) * MINIMUM_RANGE;
if (value6 <= value) {
r5 = value6;
reducibleLoop3: while (true) {
value7 = pushRange2(r5);
if (value7 <= value) {
r5 = value7;
continue reducibleLoop3;
}
break reducibleLoop3;
}
}
subscribeChannel(guildId, channelId, []);
function toIndex(a0) { // fn#54933, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7081:1102, owner: subscribeChannelDimensions.toIndex, offset: 0x0137142c, size: 86 bytes, params: 2, frame: 18
const value = a1;
const r1 = value !== undefined ? value : 0;
const Math = global.Math;
const max = Math.max;
const Math2 = global.Math;
const ceil = Math2.ceil;
const Math3 = global.Math;
return Reflect.apply(max, Math, [0, Reflect.apply(ceil, Math2, [Math3.ceil(a0 / rowHeight)]) + r1]);
}
function pushRange(a0) { // fn#54934, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7081:1182, owner: subscribeChannelDimensions.pushRange, offset: 0x01371482, size: 77 bytes, params: 2, frame: 14
let value = environment.__proto__;
const MINIMUM_RANGE = (GuildChannelSubscriptionsModule).MINIMUM_RANGE;
value = a0 + (MINIMUM_RANGE - 1);
const binding = env0_1;
binding.push([a0, value]);
return value + 1;
}
}
}
global.__d(_fun54925, 6903, [694, 6890, 2]) /* metro module 6903, dependencies: [694, 6890, 2] */;