454 lines
29 KiB
TypeScript
454 lines
29 KiB
TypeScript
/* Metro module 15716; source: modules/game_console/GameConsoleManager.tsx; dependencies: [7, 6, 15, 17, 18, 5, 1226, 4259, 4294, 4296, 4297, 4295, 9340, 4291, 3, 44, 8899, 10838, 4041, 9422, 1360, 4647, 1244, 15717, 9425, 4860, 2] */
|
|
import Module00005 from '../../by-id/module-00005.js'; /* Metro dependency 5 */
|
|
import ClassCallCheck from '../../by-id/module-00006-ClassCallCheck.js'; /* Metro dependency 6 */
|
|
import CreateClass from '../../by-id/module-00007-CreateClass.js'; /* Metro dependency 7 */
|
|
import PossibleConstructorReturn from '../../by-id/module-00015-PossibleConstructorReturn.js'; /* Metro dependency 15 */
|
|
import Module00017 from '../../by-id/module-00017.js'; /* Metro dependency 17 */
|
|
import Inherits from '../../by-id/module-00018-Inherits.js'; /* Metro dependency 18 */
|
|
import AuthenticationStore from '../../stores/AuthenticationStore.tsx'; /* Metro dependency 1226 */
|
|
import MediaEngineStore from '../../stores/MediaEngineStore.tsx'; /* Metro dependency 4259 */
|
|
import RTCConnectionStore from '../../stores/RTCConnectionStore.tsx'; /* Metro dependency 4294 */
|
|
import GameConsoleStore from './GameConsoleStore.tsx'; /* Metro dependency 4295 */
|
|
import SessionsStore from '../../stores/SessionsStore.tsx'; /* Metro dependency 4296 */
|
|
import VoiceStateStore from '../../stores/VoiceStateStore.tsx'; /* Metro dependency 4297 */
|
|
import * as FileImportTrackerModule from '../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
|
|
import * as IndexNativeModule from '../../intl/index.native.tsx'; /* Metro dependency 1244 */
|
|
import * as TimersModule from '../../external/discord_common/js/packages/timers/Timers.tsx'; /* Metro dependency 4041 */
|
|
import * as ConstantsModule from '../../external/discord_common/js/packages/media-engine/Constants.tsx'; /* Metro dependency 4291 */
|
|
import * as GameConsoleConstantsModule from './GameConsoleConstants.tsx'; /* Metro dependency 9340 */
|
|
import * as GameConsoleActionCreatorsModule from './GameConsoleActionCreators.tsx'; /* Metro dependency 9422 */
|
|
|
|
function _fun120629(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#120629, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15924:6, offset: 0x02531865, size: 460 bytes, params: 8, frame: 19
|
|
const env0_0 = require;
|
|
const syncLocalState = function() {
|
|
return _syncLocalState.apply(this, arguments);
|
|
};
|
|
const Object = global.Object;
|
|
Object.defineProperty(exports, '__esModule', {value: true});
|
|
let value = GameConsoleConstantsModule;
|
|
const env0_15 = value.GAME_CONSOLE_SESSIONS;
|
|
const env0_16 = value.USER_ACTION_REQUIRED_ERROR_CODES;
|
|
value = importDefault(3) /* metro dependency 3: Logger */;
|
|
value = new value('GameConsoleManager');
|
|
value = importDefault(4860) /* metro dependency 4860: AutomaticLifecycleManager */;
|
|
value = _fun120637(value);
|
|
value = new value();
|
|
(FileImportTrackerModule).fileFinishedImporting('modules/game_console/GameConsoleManager.tsx');
|
|
exports.default = value;
|
|
function _isNativeReflectConstruct_120630() { // fn#120630, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15924:329, offset: 0x02531a31, size: 98 bytes, params: 1, frame: 18
|
|
var Boolean;
|
|
var prototype;
|
|
var valueOf;
|
|
var call;
|
|
var Reflect;
|
|
var construct;
|
|
var closure;
|
|
var value;
|
|
var error;
|
|
try {
|
|
Boolean = global.Boolean;
|
|
prototype = Boolean.prototype;
|
|
valueOf = prototype.valueOf;
|
|
call = valueOf.call;
|
|
Reflect = global.Reflect;
|
|
construct = Reflect.construct;
|
|
Boolean = global.Boolean;
|
|
closure = function() {
|
|
};
|
|
value = Reflect.apply(construct, Reflect, [Boolean, [], closure]);
|
|
value = Reflect.apply(call, valueOf, [value]);
|
|
var result = !value;
|
|
} catch (error) {
|
|
}
|
|
return (_isNativeReflectConstruct_120630_isNativeReflectConstruct = function() {
|
|
return !!result;
|
|
})();
|
|
}
|
|
|
|
function _syncLocalState() { // fn#120634, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15924:635, offset: 0x02531a93, size: 50 bytes, params: 1, frame: 14
|
|
return Module00005(_fun120636).apply(this, arguments);
|
|
function* _fun120636(a0) { // fn#120636, original name: ?anon_0_, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15924:688, offset: 0x02531ad0, size: 217 bytes, params: 2, frame: 17
|
|
var selfDeaf;
|
|
if (true) {
|
|
value = environment.__proto__.__proto__;
|
|
var binding = env2_11;
|
|
env2_1(env2_2[15])(binding.getChannelId() == null, 'Syncing to remote while in voice!');
|
|
if (a0.selfMute === Reflect.apply(env2_10.isSelfMute, binding, [])) {
|
|
selfDeaf = a0.selfDeaf;
|
|
binding = env2_10;
|
|
if (selfDeaf !== binding.isSelfDeaf()) {
|
|
env2_1(env2_2[16]).toggleSelfDeaf({syncRemote: false});
|
|
}
|
|
} else {
|
|
binding = env2_1;
|
|
var value5 = binding(env2_2[16]);
|
|
yield value5.toggleSelfMute({syncRemote: false});
|
|
if (false) {
|
|
return undefined;
|
|
}
|
|
selfDeaf = a0.selfDeaf;
|
|
binding = env2_10;
|
|
if (selfDeaf !== binding.isSelfDeaf()) {
|
|
env2_1(env2_2[16]).toggleSelfDeaf({syncRemote: false});
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
}
|
|
|
|
function _fun120637(a0) { // fn#120637, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15924:962, offset: 0x02531ba9, size: 42 bytes, params: 2, frame: 14
|
|
const GameConsoleManager2 = GameConsoleManager;
|
|
Inherits(GameConsoleManager2, a0);
|
|
return CreateClass(GameConsoleManager2);
|
|
function GameConsoleManager(a0) { // fn#120638, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15924:974, offset: 0x02531bd3, size: 434 bytes, params: 2, frame: 21
|
|
var r0;
|
|
var Reflect;
|
|
let value = copyRestArgs(0, undefined);
|
|
let binding = env1_4;
|
|
binding(this, GameConsoleManager);
|
|
const items2 = [];
|
|
arraySpread(items2, value, 0, items2);
|
|
value = env1_6(GameConsoleManager);
|
|
binding = env1_5;
|
|
if (_isNativeReflectConstruct_120630()) {
|
|
Reflect = global.Reflect;
|
|
value = Reflect.construct(value, items2, env1_6(this).constructor);
|
|
r0 = value;
|
|
} else {
|
|
value = value.apply(this, items2);
|
|
r0 = value;
|
|
}
|
|
value = binding(this, r0);
|
|
const Timeout = (TimersModule).Timeout;
|
|
const value4 = Object.create(Timeout.prototype, {constructor: {value: Timeout}});
|
|
let timeout = new Timeout();
|
|
value.rollbackCommandTimeout = timeout instanceof Object ? timeout : value4;
|
|
const value6 = Object.create(Timeout.prototype, {constructor: {value: Timeout}});
|
|
timeout = new Timeout();
|
|
value.awaitRemoteTimeout = timeout instanceof Object ? timeout : value6;
|
|
value.actions = {WAIT_FOR_REMOTE_SESSION: WAIT_FOR_REMOTE_SESSION_120639,
|
|
POST_CONNECTION_OPEN: POST_CONNECTION_OPEN_120640, SESSIONS_REPLACE: SESSIONS_REPLACE,
|
|
AUDIO_TOGGLE_SELF_DEAF: AUDIO_TOGGLE_SELF_DEAF_120642, AUDIO_TOGGLE_SELF_MUTE: AUDIO_TOGGLE_SELF_MUTE_120643,
|
|
VOICE_STATE_UPDATES: VOICE_STATE_UPDATES_120644, CONSOLE_COMMAND_UPDATE: CONSOLE_COMMAND_UPDATE,
|
|
PASSIVE_UPDATE_V2: PASSIVE_UPDATE_V2_120646, REMOTE_SESSION_DISCONNECT: REMOTE_SESSION_DISCONNECT_120647};
|
|
value.maybeConnect = maybeConnect;
|
|
value.handleAudioStateToggle = handleAudioStateToggle;
|
|
value.handleVoiceStateUpdates = handleVoiceStateUpdates_120653;
|
|
value.handleSessionsChanged = handleSessionsChanged;
|
|
value.handleWaitForRemoteSession = handleWaitForRemoteSession;
|
|
value.handleConsoleCommandUpdate = handleConsoleCommandUpdate;
|
|
value.handleRemoteSessionDisconnect = handleRemoteSessionDisconnect;
|
|
return value;
|
|
function GameConsoleManagerWAIT_FOR_REMOTE_SESSION() { // fn#120639, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15924:1339, owner: GameConsoleManager.WAIT_FOR_REMOTE_SESSION, offset: 0x02531d85, size: 19 bytes, params: 1, frame: 9
|
|
return env0_0.handleWaitForRemoteSession();
|
|
}
|
|
|
|
function GameConsoleManagerPOST_CONNECTION_OPEN() { // fn#120640, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15924:1395, owner: GameConsoleManager.POST_CONNECTION_OPEN, offset: 0x02531d98, size: 19 bytes, params: 1, frame: 9
|
|
return env0_0.handleSessionsChanged();
|
|
}
|
|
|
|
function SESSIONS_REPLACE() { // fn#120641, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15924:1442, owner: GameConsoleManager.SESSIONS_REPLACE, offset: 0x02531d98, size: 19 bytes, params: 1, frame: 9
|
|
return env0_0.handleSessionsChanged();
|
|
}
|
|
|
|
function GameConsoleManagerAUDIO_TOGGLE_SELF_DEAF(a0) { // fn#120642, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15924:1495, owner: GameConsoleManager.AUDIO_TOGGLE_SELF_DEAF, offset: 0x02531dab, size: 23 bytes, params: 2, frame: 11
|
|
return env0_0.handleAudioStateToggle(a0);
|
|
}
|
|
|
|
function GameConsoleManagerAUDIO_TOGGLE_SELF_MUTE(a0) { // fn#120643, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15924:1549, owner: GameConsoleManager.AUDIO_TOGGLE_SELF_MUTE, offset: 0x02531dab, size: 23 bytes, params: 2, frame: 11
|
|
return env0_0.handleAudioStateToggle(a0);
|
|
}
|
|
|
|
function GameConsoleManagerVOICE_STATE_UPDATES(a0) { // fn#120644, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15924:1600, owner: GameConsoleManager.VOICE_STATE_UPDATES, offset: 0x02531dc2, size: 23 bytes, params: 2, frame: 11
|
|
return env0_0.handleVoiceStateUpdates(a0);
|
|
}
|
|
|
|
function CONSOLE_COMMAND_UPDATE(a0) { // fn#120645, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15924:1655, owner: GameConsoleManager.CONSOLE_COMMAND_UPDATE, offset: 0x02531dd9, size: 23 bytes, params: 2, frame: 11
|
|
return env0_0.handleConsoleCommandUpdate(a0);
|
|
}
|
|
|
|
function GameConsoleManagerPASSIVE_UPDATE_V2(a0) { // fn#120646, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15924:1708, owner: GameConsoleManager.PASSIVE_UPDATE_V2, offset: 0x02531dc2, size: 23 bytes, params: 2, frame: 11
|
|
return env0_0.handleVoiceStateUpdates(a0);
|
|
}
|
|
|
|
function GameConsoleManagerREMOTE_SESSION_DISCONNECT() { // fn#120647, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15924:1766, owner: GameConsoleManager.REMOTE_SESSION_DISCONNECT, offset: 0x02531df0, size: 19 bytes, params: 1, frame: 9
|
|
return env0_0.handleRemoteSessionDisconnect();
|
|
}
|
|
|
|
function maybeConnect(a0) { // fn#120648, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15924:1820, owner: GameConsoleManager.maybeConnect, offset: 0x02531e03, size: 141 bytes, params: 2, frame: 17
|
|
let value = ((a0) => {
|
|
var env0_0 = GameConsoleStore.getAwaitingRemoteSessionInfo();
|
|
return a0.find(_fun120650);
|
|
})(a0);
|
|
if (value == null) {
|
|
return null;
|
|
}
|
|
env0_0.awaitRemoteTimeout.stop();
|
|
GameConsoleActionCreatorsModule.connectToRemote(value.sessionId);
|
|
value = VoiceStateStore.getVoiceStateForSession(AuthenticationStore.getId(), value.sessionId);
|
|
if (value != null) {
|
|
syncLocalState(value);
|
|
}
|
|
function findRemoteSession(a0) { // fn#120649, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15924:1830, owner: GameConsoleManager.maybeConnect.findRemoteSession, offset: 0x02531e90, size: 46 bytes, params: 2, frame: 12
|
|
const env0_0 = GameConsoleStore.getAwaitingRemoteSessionInfo();
|
|
return a0.find(_fun120650);
|
|
function _fun120650(a0) { // fn#120650, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15924:1914, offset: 0x02531ebe, size: 160 bytes, params: 2, frame: 17
|
|
var r2;
|
|
let value = environment.__proto__.__proto__.__proto__.__proto__;
|
|
const value2 = GAME_CONSOLE_SESSIONS.has(a0.clientInfo.os);
|
|
const voiceStateStoreBinding = VoiceStateStore;
|
|
const getVoiceStateForSession = voiceStateStoreBinding.getVoiceStateForSession;
|
|
const value5 = Reflect.apply(getVoiceStateForSession, voiceStateStoreBinding, [AuthenticationStore.getId(),
|
|
a0.sessionId]) != null;
|
|
const value7 = env0_0 == null;
|
|
if (value7) {
|
|
r2 = value7;
|
|
} else {
|
|
value = require(10838) /* metro dependency 10838: coercePlatformTypeToConsoleType */;
|
|
value = value.coercePlatformTypeToConsoleType(env0_0.type);
|
|
value = value === a0.clientInfo.os;
|
|
r2 = value;
|
|
}
|
|
return value2 && r2 && value5;
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
function handleAudioStateToggle({syncRemote, context}) { // fn#120651, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15924:2301, owner: GameConsoleManager.handleAudioStateToggle, offset: 0x02531f5e, size: 246 bytes, params: 2, frame: 19
|
|
var environment;
|
|
var value;
|
|
var isSelfDeaf2;
|
|
var isSelfMute2;
|
|
var id;
|
|
var remoteSessionId;
|
|
var voiceStateForSession;
|
|
if (syncRemote) {
|
|
value = environment.__proto__.__proto__;
|
|
if (context === MediaEngineContextTypes.DEFAULT) {
|
|
isSelfDeaf2 = MediaEngineStore.isSelfDeaf();
|
|
isSelfMute2 = MediaEngineStore.isSelfMute();
|
|
id = AuthenticationStore.getId();
|
|
remoteSessionId = GameConsoleStore.getRemoteSessionId();
|
|
if (remoteSessionId != null) {
|
|
voiceStateForSession = VoiceStateStore.getVoiceStateForSession(id, remoteSessionId);
|
|
if (voiceStateForSession != null) {
|
|
if (!(voiceStateForSession.selfDeaf === isSelfDeaf2 && voiceStateForSession.selfMute === isSelfMute2)) {
|
|
value = require(9422) /* metro dependency 9422: GameConsoleActionCreators */;
|
|
value.remoteVoiceStateUpdate(remoteSessionId, {selfDeaf: isSelfDeaf2, selfMute: isSelfMute2});
|
|
voiceStateForSession.rollbackCommandTimeout.start(3000, _fun120652);
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
function _fun120652() { // fn#120652, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15924:2613, offset: 0x02532054, size: 23 bytes, params: 1, frame: 11
|
|
syncLocalState(env0_0);
|
|
}
|
|
|
|
}
|
|
|
|
function GameConsoleManagerHandleVoiceStateUpdates({voiceStates}) { // fn#120653, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15924:2670, owner: GameConsoleManager.handleVoiceStateUpdates, offset: 0x0253206b, size: 173 bytes, params: 2, frame: 14
|
|
var environment;
|
|
var value5;
|
|
const value = environment.__proto__.__proto__;
|
|
const remoteSessionId = GameConsoleStore.getRemoteSessionId();
|
|
const remoteSessionId2 = remoteSessionId;
|
|
if (remoteSessionId == null) {
|
|
value5 = voiceStates.map(_fun120654);
|
|
return remoteSessionId2.maybeConnect(value5.filter((require(1360) /* metro dependency 1360: GlobalUtils */).isNotNullish));
|
|
}
|
|
const value3 = voiceStates.find(_fun120655);
|
|
if (value3 != null) {
|
|
remoteSessionId2.rollbackCommandTimeout.stop();
|
|
syncLocalState(value3);
|
|
}
|
|
function _fun120654({sessionId}) { // fn#120654, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15924:2744, offset: 0x02532118, size: 38 bytes, params: 2, frame: 12
|
|
var r0;
|
|
let value = null;
|
|
if (value != sessionId) {
|
|
value = environment.__proto__.__proto__.__proto__;
|
|
value = SessionsStore.getSessionById(sessionId);
|
|
r0 = value;
|
|
} else {
|
|
r0 = value;
|
|
}
|
|
return r0;
|
|
}
|
|
|
|
function _fun120655({sessionId}) { // fn#120655, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15924:2865, offset: 0x0253213e, size: 22 bytes, params: 2, frame: 2
|
|
return sessionId === env0_0;
|
|
}
|
|
|
|
}
|
|
|
|
function handleSessionsChanged() { // fn#120656, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15924:2976, owner: GameConsoleManager.handleSessionsChanged, offset: 0x02532154, size: 138 bytes, params: 1, frame: 14
|
|
var r3;
|
|
var sessionsStoreBinding;
|
|
var binding;
|
|
var maybeConnect;
|
|
var Object;
|
|
var values;
|
|
const remoteSessionId = GameConsoleStore.getRemoteSessionId();
|
|
const value3 = remoteSessionId != null;
|
|
if (value3) {
|
|
sessionsStoreBinding = SessionsStore;
|
|
r3 = sessionsStoreBinding.getSessionById(remoteSessionId) == null;
|
|
} else {
|
|
r3 = value3;
|
|
}
|
|
if (r3) {
|
|
(require(9422) /* metro dependency 9422: GameConsoleActionCreators */).disconnectRemote();
|
|
}
|
|
if (remoteSessionId == null) {
|
|
binding = env0_0;
|
|
maybeConnect = binding.maybeConnect;
|
|
Object = global.Object;
|
|
values = Object.values;
|
|
sessionsStoreBinding = SessionsStore;
|
|
Reflect.apply(maybeConnect, binding, [Reflect.apply(values, Object, [sessionsStoreBinding.getSessions()])]);
|
|
}
|
|
}
|
|
|
|
function handleWaitForRemoteSession() { // fn#120657, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15924:3160, owner: GameConsoleManager.handleWaitForRemoteSession, offset: 0x025321de, size: 43 bytes, params: 1, frame: 13
|
|
env0_0.awaitRemoteTimeout.start(60000, _fun120658);
|
|
function _fun120658() { // fn#120658, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15924:3197, offset: 0x02532209, size: 169 bytes, params: 1, frame: 18
|
|
let value = environment.__proto__.__proto__.__proto__;
|
|
(GameConsoleActionCreatorsModule).disconnectRemote();
|
|
value = importDefault(4647) /* metro dependency 4647: AlertActionCreators */;
|
|
const show = value.show;
|
|
const intl = (IndexNativeModule).intl;
|
|
const string = intl.string;
|
|
const t = (IndexNativeModule).t;
|
|
Reflect.apply(show, value, [{title: Reflect.apply(string, intl, [t.wGMxr3]), body: intl.string(t.i5k8b5)}]);
|
|
}
|
|
|
|
}
|
|
|
|
function handleConsoleCommandUpdate({id, result, error}) { // fn#120659, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15924:3371, owner: GameConsoleManager.handleConsoleCommandUpdate, offset: 0x025322b2, size: 527 bytes, params: 2, frame: 26
|
|
var environment;
|
|
var r5;
|
|
var type;
|
|
var value2;
|
|
var gameConsoleStoreBinding;
|
|
var awaitingRemoteSessionInfo;
|
|
var value4;
|
|
var getDevice;
|
|
var value6;
|
|
var defaultImport;
|
|
var object;
|
|
const intl = (IndexNativeModule).intl;
|
|
const t = (IndexNativeModule).t;
|
|
var value7;
|
|
var awaitRemoteTimeout;
|
|
const value = result === 'failed';
|
|
if (value) {
|
|
if (error != null) {
|
|
value2 = environment.__proto__.__proto__;
|
|
env2_18.info('Console command Error result:', result, error);
|
|
awaitingRemoteSessionInfo = GameConsoleStore.getAwaitingRemoteSessionInfo();
|
|
value4 = undefined;
|
|
if ((awaitingRemoteSessionInfo == null ? value4 : awaitingRemoteSessionInfo.commandId) === id) {
|
|
gameConsoleStoreBinding = GameConsoleStore;
|
|
getDevice = gameConsoleStoreBinding.getDevice;
|
|
type = awaitingRemoteSessionInfo.type;
|
|
r5 = awaitingRemoteSessionInfo.deviceId ?? '';
|
|
value6 = Reflect.apply(getDevice, gameConsoleStoreBinding, [type, r5]);
|
|
defaultImport = importDefault(15717) /* metro dependency 15717: getErrorMessageForCommandResult */;
|
|
if (value6 != null) {
|
|
r5 = value6;
|
|
} else {
|
|
object = {id: 'id'};
|
|
object.platform = intl.string(t['UQMV/E']);
|
|
object.name = intl.string(t['UQMV/E']);
|
|
r5 = object;
|
|
}
|
|
value7 = defaultImport(r5, result, error);
|
|
if (value7 != null) {
|
|
(importDefault(9425) /* metro dependency 9425: GameConsoleAlertUtils */).showSelfDismissableAlert({title: value7.title,
|
|
|
|
|
|
|
|
|
|
body: value7.body, errorCodeMessage: value7.errorCodeMessage,
|
|
reconnectPlatformType: value7.isAccountLinkError ? awaitingRemoteSessionInfo.type : value4});
|
|
}
|
|
if (USER_ACTION_REQUIRED_ERROR_CODES.has(error.code)) {
|
|
awaitRemoteTimeout = env0_0.awaitRemoteTimeout;
|
|
if (awaitRemoteTimeout.isStarted()) {
|
|
env0_0.awaitRemoteTimeout.start(180000, _fun120660, true);
|
|
} else if (value) {
|
|
(require(9422) /* metro dependency 9422: GameConsoleActionCreators */).disconnectRemote();
|
|
}
|
|
} else if (value) {
|
|
(require(9422) /* metro dependency 9422: GameConsoleActionCreators */).disconnectRemote();
|
|
}
|
|
}
|
|
}
|
|
} else if (result === 'n/a') {
|
|
if (error != null) {
|
|
value2 = environment.__proto__.__proto__;
|
|
env2_18.info('Console command Error result:', result, error);
|
|
awaitingRemoteSessionInfo = GameConsoleStore.getAwaitingRemoteSessionInfo();
|
|
value4 = undefined;
|
|
if ((awaitingRemoteSessionInfo == null ? value4 : awaitingRemoteSessionInfo.commandId) === id) {
|
|
gameConsoleStoreBinding = GameConsoleStore;
|
|
getDevice = gameConsoleStoreBinding.getDevice;
|
|
type = awaitingRemoteSessionInfo.type;
|
|
r5 = awaitingRemoteSessionInfo.deviceId ?? '';
|
|
value6 = Reflect.apply(getDevice, gameConsoleStoreBinding, [type, r5]);
|
|
defaultImport = importDefault(15717) /* metro dependency 15717: getErrorMessageForCommandResult */;
|
|
if (value6 != null) {
|
|
r5 = value6;
|
|
} else {
|
|
object = {id: 'id'};
|
|
object.platform = intl.string(t['UQMV/E']);
|
|
object.name = intl.string(t['UQMV/E']);
|
|
r5 = object;
|
|
}
|
|
value7 = defaultImport(r5, result, error);
|
|
if (value7 != null) {
|
|
(importDefault(9425) /* metro dependency 9425: GameConsoleAlertUtils */).showSelfDismissableAlert({title: value7.title,
|
|
|
|
|
|
|
|
|
|
body: value7.body, errorCodeMessage: value7.errorCodeMessage,
|
|
reconnectPlatformType: value7.isAccountLinkError ? awaitingRemoteSessionInfo.type : value4});
|
|
}
|
|
if (USER_ACTION_REQUIRED_ERROR_CODES.has(error.code)) {
|
|
awaitRemoteTimeout = env0_0.awaitRemoteTimeout;
|
|
if (awaitRemoteTimeout.isStarted()) {
|
|
env0_0.awaitRemoteTimeout.start(180000, _fun120660, true);
|
|
} else if (value) {
|
|
(require(9422) /* metro dependency 9422: GameConsoleActionCreators */).disconnectRemote();
|
|
}
|
|
} else if (value) {
|
|
(require(9422) /* metro dependency 9422: GameConsoleActionCreators */).disconnectRemote();
|
|
}
|
|
}
|
|
}
|
|
}
|
|
function _fun120660() { // fn#120660, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15924:3998, offset: 0x025324c1, size: 37 bytes, params: 1, frame: 11
|
|
const value = environment.__proto__.__proto__.__proto__;
|
|
return (GameConsoleActionCreatorsModule).disconnectRemote();
|
|
}
|
|
|
|
}
|
|
|
|
function handleRemoteSessionDisconnect() { // fn#120661, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15924:4112, owner: GameConsoleManager.handleRemoteSessionDisconnect, offset: 0x025324e6, size: 27 bytes, params: 1, frame: 9
|
|
env0_0.awaitRemoteTimeout.stop();
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
global.__d(_fun120629, 15716, [7, 6, 15, 17, 18, 5, 1226, 4259, 4294, 4296, 4297, 4295, 9340, 4291, 3, 44, 8899,
|
|
10838, 4041, 9422, 1360, 4647, 1244, 15717, 9425, 4860,
|
|
2]) /* metro module 15716, dependencies: [7, 6, 15, 17, 18, 5, 1226, 4259, 4294, 4296, 4297, 4295, 9340, 4291, 3, 44, 8899, 10838, 4041, 9422, 1360, 4647, 1244, 15717, 9425, 4860, 2] */;
|