decord/source/modules/calls/native/usePrivateChannelCall.tsx
github-actions f0f877e8ce chore: update source for alpha 347.1
Skipped 1 file(s) >100MB (GitHub limit): source/__polyfill/04xxx/module_4824.js (118.4 MB)
2026-09-15 14:23:42 +00:00

126 lines
4.1 KiB
TypeScript

// Module ID: 13266
// Function ID: 13267
// Name: usePrivateChannelCall
// Dependencies: [5, 19, 1958, 504, 1115, 11002, 4652, 2]
// Exports: default
// Module 13266 (usePrivateChannelCall)
import util from "util" /* 1115 */;
import getPrivateChannelCallDefault from "getPrivateChannelCall" /* 11002 */;
import asyncGeneratorStep from "asyncGeneratorStep" /* 5 */;
import noop from "module_19" /* 19 */;
import ChannelStore from "ChannelStore" /* 1958 */;
const require = globalThis.__r;
require = fn;
const size = fn(2);
const result = size.fileFinishedImporting("modules/calls/native/usePrivateChannelCall.tsx");
export default function usePrivateChannelCall(arg0, arg1, arg2) {
_require = arg0;
closure_1 = arg1;
dependencyMap = arg2;
const items = [ChannelStore];
const items1 = [arg1, arg0];
const stateFromStoresObject = require("initialize").useStateFromStoresObject(items, () => {
const channel = ChannelStore.getChannel(ChannelStore.getDMFromUserId(closure_0));
if (null != channel) {
if (channel.isPrivate()) {
({ text: obj2.text, accessibilityHint: obj2.accessibilityHint, inCall: obj2.inCall } = getPrivateChannelCallDefault(channel, closure_1));
return { text: null, accessibilityHint: null, inCall: null };
}
}
const intl = util.intl;
const string = intl.string;
const t = util.t;
if (closure_1) {
let stringResult = string(t["7AWk50"]);
let tmp10 = tmp6;
} else {
stringResult = string(t["EZgS+9"]);
tmp10 = tmp6;
}
const obj3 = { text: stringResult, accessibilityHint: null, inCall: false };
const intl2 = tmp10(1115).intl;
const string2 = intl2.string;
const t2 = tmp10(1115).t;
if (closure_1) {
let string2Result = string2(t2.oCqlGG);
} else {
string2Result = string2(t2.focH1t);
}
obj3.accessibilityHint = string2Result;
return obj3;
}, items1);
const obj2 = { text: stateFromStoresObject.text, inCall: stateFromStoresObject.inCall, accessibilityHint: stateFromStoresObject.accessibilityHint, handlePress: null };
const items2 = [arg0, arg1, arg2];
obj2.handlePress = noop.useCallback(asyncGeneratorStep(async (arg0, value) => {
if (c3 === 2) {
c3 = 3;
throw new TypeError("Generator functions may not be called on executing generators");
} else if (tmp5 === 3) {
if (arg0 === 1) {
throw value;
} else if (arg0 === 2) {
const obj5 = { value, done: true };
return obj5;
} else {
return { value: "HermesInternal", done: null };
}
} else {
try {
c3 = 2;
if (0 === dependencyMap) {
if (arg0 === 1) {
c3 = 3;
throw value;
} else if (arg0 === 2) {
c3 = 3;
const obj6 = { value, done: true };
return obj6;
} else {
closure_0 = tmp2;
let channel;
closure_128_1 = undefined;
channel = authStore.getChannel(authStore.getDMFromUserId(closure_0));
if (null == channel) {
dependencyMap = 1;
c3 = 1;
const obj7 = { value: tmp3(4652).ensurePrivateChannel(tmp32), done: false };
return obj7;
}
tmp32 = closure_0;
}
} else if (arg0 === 1) {
c3 = 3;
throw value;
} else if (arg0 === 2) {
c3 = 3;
const obj = { value, done: true };
return obj;
} else {
closure_128_1 = value;
channel = authStore.getChannel(closure_128_1);
}
let isPrivateResult;
if (channel != null) {
isPrivateResult = channel.isPrivate();
}
if (isPrivateResult) {
tmp3(11002)(channel, closure_129_1).onPress();
const obj3 = tmp3(11002)(channel, closure_129_1);
}
if (closure_129_2 != null) {
closure_129_2();
}
c3 = 3;
return { value: "HermesInternal", done: null };
} catch (tmp25) {
c3 = tmp;
throw tmp25;
}
}
}), items2);
return obj2;
};