Files
discord-decomp/sources/modules/calls/native/usePrivateChannelCall.tsx
T
2026-07-27 16:20:00 +03:00

93 lines
4.4 KiB
TypeScript

/* Metro module 10493; source: modules/calls/native/usePrivateChannelCall.tsx; dependencies: [5, 31, 1379, 566, 1244, 7708, 4603, 2] */
function _fun81182(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#81182, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10679:6, offset: 0x01e9d445, size: 153 bytes, params: 8, frame: 19
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_3 = importDefault(5) /* metro dependency 5 */;
const env0_4 = importAll(31) /* metro dependency 31 */;
const channelStore = importDefault(1379) /* metro dependency 1379: ChannelStore */;
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/calls/native/usePrivateChannelCall.tsx');
exports.default = usePrivateChannelCall;
}
function usePrivateChannelCall(a0, a1, a2) { // fn#81183, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10679:216, offset: 0x01e9d4de, size: 179 bytes, params: 4, frame: 21
var object2;
const env0_0 = a0;
const env0_1 = a1;
const env0_2 = a2;
const value2 = (require(566) /* metro dependency 566: flux */).useStateFromStoresObject([ChannelStore], _fun81184,
[a1, a0]);
const text = value2.text;
const accessibilityHint = value2.accessibilityHint;
object2 = {text: text};
object2.inCall = value2.inCall;
object2.accessibilityHint = accessibilityHint;
object2.handlePress = env0_4.useCallback(env0_3(_fun81186), [a0, a1, a2]);
return object2;
}
function _fun81184() { // fn#81184, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10679:298, offset: 0x01e9d591, size: 290 bytes, params: 1, frame: 19
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
const t = (require(1244) /* metro dependency 1244: indexNative */).t;
let value = environment.__proto__;
const getChannel = ChannelStore.getChannel;
const getDMFromUserId = ChannelStore.getDMFromUserId;
const value3 = Reflect.apply(getChannel, ChannelStore, [Reflect.apply(getDMFromUserId, ChannelStore, [env0_0])]);
if (value3 != null) {
if (value3.isPrivate()) {
value = importDefault(7708) /* metro dependency 7708: getPrivateChannelCall */;
value = value(value3, require);
return {text: value.text, accessibilityHint: value.accessibilityHint, inCall: value.inCall};
}
}
const object2 = {};
let string = intl.string;
object2.text = require ? Reflect.apply(string, intl, [t['7AWk50']]) : Reflect.apply(string, intl, [t['EZgS+9']]);
string = intl.string;
object2.accessibilityHint = require ? Reflect.apply(string, intl, [t.oCqlGG]) : Reflect.apply(string, intl,
[t.focH1t]);
object2.inCall = false;
return object2;
}
function* _fun81186() { // fn#81186, original name: ?anon_0_, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10679:786, offset: 0x01e9d6be, size: 202 bytes, params: 1, frame: 17
var r7;
if (true) {
value = environment.__proto__.__proto__;
var binding = env2_5;
var getChannel = binding.getChannel;
var getDMFromUserId = binding.getDMFromUserId;
var value4 = Reflect.apply(getChannel, binding, [Reflect.apply(getDMFromUserId, binding, [require])]);
if (value4 != null) {
r7 = value4;
if (r7 != null && r7.isPrivate()) {
value = env2_1(env2_2[5]);
value = value(r7, importDefault);
value.onPress();
}
if (dependencyMap != null) {
dependencyMap();
}
} else {
binding = env2_1;
var value5 = binding(env2_2[6]);
yield value5.ensurePrivateChannel(require);
var value6 = undefined;
if (false) {
return value6;
}
binding = env2_5;
r7 = binding.getChannel(value6);
if (r7 != null && r7.isPrivate()) {
value = env2_1(env2_2[5]);
value = value(r7, importDefault);
value.onPress();
}
if (dependencyMap != null) {
dependencyMap();
}
}
}
}