Files
discord-decomp/sources/modules/video_calls/useDeafStates.tsx
T
2026-07-27 16:20:00 +03:00

48 lines
2.7 KiB
TypeScript

/* Metro module 10845; source: modules/video_calls/useDeafStates.tsx; dependencies: [1226, 4259, 4297, 566, 2] */
function _fun83124(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#83124, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11031:6, offset: 0x01f0e5c4, size: 163 bytes, params: 8, frame: 20
let env0_0 = require;
const closure = getDeafStates;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const authenticationStore = importDefault(1226) /* metro dependency 1226: AuthenticationStore */;
const mediaEngineStore = importDefault(4259) /* metro dependency 4259: MediaEngineStore */;
const voiceStateStore = importDefault(4297) /* metro dependency 4297: VoiceStateStore */;
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/video_calls/useDeafStates.tsx');
exports.default = function(a0) {
var env0_0 = a0;
return require(dependencyMap[3]).useStateFromStoresObject([VoiceStateStore, MediaEngineStore,
AuthenticationStore],
_fun83127, [a0]);
};
exports.getDeafStates = closure;
}
function getDeafStates(a0) { // fn#83125, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11031:126, offset: 0x01f0e667, size: 139 bytes, params: 2, frame: 18
let value = a1;
const value2 = a2;
const value3 = a3;
const value4 = undefined;
const r7 = value !== value4 ? value : VoiceStateStore;
const r5 = value2 !== value4 ? value2 : MediaEngineStore;
const r8 = value3 !== value4 ? value3 : AuthenticationStore;
value = null;
const r3 = value != a0 ? r7.getVoiceState(a0.getGuildId(), r8.getId()) : value;
const object2 = {};
object2.selfDeaf = r5.isSelfDeaf();
const deaf = value == r3 ? value4 : r3.deaf;
value = value != deaf;
object2.deaf = value && deaf;
return object2;
}
function useDeafStates(a0) { // fn#83126, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11031:380, offset: 0x01f0e6f2, size: 92 bytes, params: 2, frame: 17
const env0_0 = a0;
return (require(566) /* metro dependency 566: flux */).useStateFromStoresObject([VoiceStateStore, MediaEngineStore,
AuthenticationStore], _fun83127, [a0]);
}
function _fun83127() { // fn#83127, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11031:455, offset: 0x01f0e74e, size: 34 bytes, params: 1, frame: 17
return getDeafStates(env0_0, VoiceStateStore, MediaEngineStore, AuthenticationStore);
}