65 lines
3.8 KiB
TypeScript
65 lines
3.8 KiB
TypeScript
/* Metro module 15354; source: modules/external_pip/useExternalPipEnabler.android.tsx; dependencies: [4606, 1226, 4294, 566, 15355, 2] */
|
|
import AuthenticationStore from '../../stores/AuthenticationStore.tsx'; /* Metro dependency 1226 */
|
|
import RTCConnectionStore from '../../stores/RTCConnectionStore.tsx'; /* Metro dependency 4294 */
|
|
import ChannelRTCStore from '../calls/ChannelRTCStore.tsx'; /* Metro dependency 4606 */
|
|
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 _fun117370(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#117370, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15551:6, offset: 0x024b0841, size: 146 bytes, params: 8, frame: 19
|
|
let env0_0 = require;
|
|
const Object = global.Object;
|
|
Object.defineProperty(exports, '__esModule', {value: true});
|
|
(FileImportTrackerModule).fileFinishedImporting('modules/external_pip/useExternalPipEnabler.android.tsx');
|
|
exports.default = function({disabled}) {
|
|
var env0_0 = disabled;
|
|
return require(dependencyMap[3]).useStateFromStoresObject([ChannelRTCStore, RTCConnectionStore,
|
|
AuthenticationStore], _fun117372, [disabled]);
|
|
};
|
|
function useExternalPIPEnabler({disabled}) { // fn#117371, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15551:224, offset: 0x024b08d3, size: 97 bytes, params: 2, frame: 17
|
|
return (FluxModule).useStateFromStoresObject([ChannelRTCStore,
|
|
RTCConnectionStore, AuthenticationStore], _fun117372, [disabled]);
|
|
function _fun117372() { // fn#117372, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15551:318, offset: 0x024b0934, size: 219 bytes, params: 1, frame: 16
|
|
var r3;
|
|
var r6;
|
|
var streamParticipants;
|
|
var value7;
|
|
const channelId = RTCConnectionStore.getChannelId();
|
|
if (channelId == null) {
|
|
return (require(15355) /* metro dependency 15355: ExternalPipEnablerState */).DEFAULT_STATE;
|
|
}
|
|
if (disabled) {
|
|
return (require(15355) /* metro dependency 15355: ExternalPipEnablerState */).DEFAULT_STATE;
|
|
}
|
|
const videoParticipants = ChannelRTCStore.getVideoParticipants(channelId);
|
|
const value5 = videoParticipants.filter(function(a0) {
|
|
return !a0.localVideoDisabled;
|
|
}).length > 0;
|
|
if (value5) {
|
|
r3 = value5;
|
|
r6 = channelId;
|
|
} else {
|
|
streamParticipants = ChannelRTCStore.getStreamParticipants(channelId);
|
|
value7 = streamParticipants.filter(function(a0) {
|
|
return a0.user.id !== AuthenticationStore.getId();
|
|
});
|
|
r3 = value7.find(_fun117375) != null;
|
|
r6 = streamParticipants;
|
|
}
|
|
const object = {};
|
|
const DEFAULT_STATE = (require(15355) /* metro dependency 15355: ExternalPipEnablerState */).DEFAULT_STATE;
|
|
copyDataProperties(object, DEFAULT_STATE, r6);
|
|
object['externalPipEnabled'] = r3;
|
|
return object;
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
function _fun117375({streamId}) { // fn#117375, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15551:540, offset: 0x024b0a41, size: 17 bytes, params: 2, frame: 2
|
|
return streamId != null;
|
|
}
|
|
|
|
global.__d(_fun117370, 15354, [4606, 1226, 4294, 566, 15355,
|
|
2]) /* metro module 15354, dependencies: [4606, 1226, 4294, 566, 15355, 2] */;
|