53 lines
3.1 KiB
TypeScript
53 lines
3.1 KiB
TypeScript
/* Metro module 10845; source: modules/video_calls/useDeafStates.tsx; dependencies: [1226, 4259, 4297, 566, 2] */
|
|
import AuthenticationStore from '../../stores/AuthenticationStore.tsx'; /* Metro dependency 1226 */
|
|
import MediaEngineStore from '../../stores/MediaEngineStore.tsx'; /* Metro dependency 4259 */
|
|
import VoiceStateStore from '../../stores/VoiceStateStore.tsx'; /* Metro dependency 4297 */
|
|
import * as FileImportTrackerModule from '../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
|
|
import * as FluxModule from '../../external/discord_common/js/packages/flux/index.tsx'; /* Metro dependency 566 */
|
|
|
|
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 getDeafStates2 = getDeafStates;
|
|
const Object = global.Object;
|
|
Object.defineProperty(exports, '__esModule', {value: true});
|
|
(FileImportTrackerModule).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 = getDeafStates2;
|
|
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 object = {};
|
|
object.selfDeaf = r5.isSelfDeaf();
|
|
const deaf = value == r3 ? value4 : r3.deaf;
|
|
value = value != deaf;
|
|
object.deaf = value && deaf;
|
|
return object;
|
|
}
|
|
|
|
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 (FluxModule).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);
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
global.__d(_fun83124, 10845, [1226, 4259, 4297, 566,
|
|
2]) /* metro module 10845, dependencies: [1226, 4259, 4297, 566, 2] */;
|