Files
2026-07-28 01:06:53 +03:00

100 lines
5.4 KiB
TypeScript

/* Metro module 10493; source: modules/calls/native/usePrivateChannelCall.tsx; dependencies: [5, 31, 1379, 566, 1244, 7708, 4603, 2] */
import Module00005 from '../../../by-id/module-00005.js'; /* Metro dependency 5 */
import ChannelStore from '../../../stores/ChannelStore.tsx'; /* Metro dependency 1379 */
import * as FileImportTrackerModule from '../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ReactModule from '../../../by-id/module-00031-React.js'; /* Metro dependency 31 */
import * as FluxModule from '../../../external/discord_common/js/packages/flux/index.tsx'; /* Metro dependency 566 */
import * as IndexNativeModule from '../../../intl/index.native.tsx'; /* Metro dependency 1244 */
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});
(FileImportTrackerModule).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
const env0_0 = a0;
const env0_1 = a1;
const env0_2 = a2;
const value2 = (FluxModule).useStateFromStoresObject([ChannelStore], _fun81184,
[a1, a0]);
const text = value2.text;
const accessibilityHint = value2.accessibilityHint;
object = {text: text};
object.inCall = value2.inCall;
object.accessibilityHint = accessibilityHint;
object.handlePress = ReactModule.useCallback(Module00005(_fun81186), [a0, a1, a2]);
return object;
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 = (IndexNativeModule).intl;
const t = (IndexNativeModule).t;
let value = environment.__proto__;
const channelStoreBinding = ChannelStore;
const getChannel = channelStoreBinding.getChannel;
const getDMFromUserId = channelStoreBinding.getDMFromUserId;
const value3 = Reflect.apply(getChannel, channelStoreBinding, [Reflect.apply(getDMFromUserId, channelStoreBinding,
[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 object = {};
let string = intl.string;
object.text = require ? Reflect.apply(string, intl, [t['7AWk50']]) : Reflect.apply(string, intl, [t['EZgS+9']]);
string = intl.string;
object.accessibilityHint = require ? Reflect.apply(string, intl, [t.oCqlGG]) : Reflect.apply(string, intl,
[t.focH1t]);
object.inCall = false;
return object;
}
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();
}
}
}
}
}
}
global.__d(_fun81182, 10493, [5, 31, 1379, 566, 1244, 7708, 4603,
2]) /* metro module 10493, dependencies: [5, 31, 1379, 566, 1244, 7708, 4603, 2] */;