109 lines
6.1 KiB
TypeScript
109 lines
6.1 KiB
TypeScript
/* Metro module 12995; source: modules/routing/native/BackPressManager.tsx; dependencies: [6, 7, 15, 17, 18, 27, 8812, 4022, 1583, 1482, 477, 4561, 2] */
|
|
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 LifecycleManager from '../../../lib/LifecycleManager.tsx'; /* Metro dependency 4561 */
|
|
import * as FileImportTrackerModule from '../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
|
|
import * as ReactNativeModule from '../../../by-id/module-00027-ReactNative.js'; /* Metro dependency 27 */
|
|
import * as KeyboardTypesModule from '../../keyboard/native/KeyboardTypes.tsx'; /* Metro dependency 1583 */
|
|
import * as UseKeyboardTypeModule from '../../keyboard/native/useKeyboardType.tsx'; /* Metro dependency 4022 */
|
|
import * as ContextMenuStateNativeModule from '../../../design/components/ContextMenu/native/ContextMenuState.native.tsx'; /* Metro dependency 8812 */
|
|
|
|
function _fun99115(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#99115, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13185:6, offset: 0x021bb844, size: 259 bytes, params: 8, frame: 19
|
|
const env0_0 = require;
|
|
const Object = global.Object;
|
|
Object.defineProperty(exports, '__esModule', {value: true});
|
|
let value = LifecycleManager;
|
|
value = _fun99120(value);
|
|
value = new value();
|
|
(FileImportTrackerModule).fileFinishedImporting('modules/routing/native/BackPressManager.tsx');
|
|
exports.default = value;
|
|
function _isNativeReflectConstruct_99116() { // fn#99116, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13185:170, offset: 0x021bb947, 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_99116_isNativeReflectConstruct = function() {
|
|
return !!result;
|
|
})();
|
|
}
|
|
|
|
function handleBackPress() { // fn#99119, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13185:363, offset: 0x021bb9a9, size: 156 bytes, params: 1, frame: 16
|
|
var r0;
|
|
var value;
|
|
(ContextMenuStateNativeModule).hideContextMenu();
|
|
const keyboardType = (UseKeyboardTypeModule).getKeyboardType();
|
|
const KeyboardTypes = (KeyboardTypesModule).KeyboardTypes;
|
|
const SYSTEM = KeyboardTypes.SYSTEM;
|
|
const value3 = keyboardType !== SYSTEM;
|
|
if (value3) {
|
|
value = require(1482) /* metro dependency 1482: KeyboardUIStoreNative */;
|
|
value.setKeyboardType({type: KeyboardTypes.SYSTEM});
|
|
value = true;
|
|
r0 = value;
|
|
} else {
|
|
r0 = value3;
|
|
}
|
|
return !!r0;
|
|
}
|
|
|
|
function _fun99120(a0) { // fn#99120, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13185:605, offset: 0x021bba45, size: 124 bytes, params: 2, frame: 16
|
|
const BackPressManager2 = BackPressManager;
|
|
Inherits(BackPressManager2, a0);
|
|
return CreateClass(BackPressManager2, [{key: '_initialize', value: value_99122},
|
|
{key: '_initializeGlobalBackPressListener', value: value_99123}, {key: '_terminate', value: function() {
|
|
var _backPressEventSubscription = this._backPressEventSubscription;
|
|
if (_backPressEventSubscription != null) {
|
|
_backPressEventSubscription.remove();
|
|
}
|
|
}}]);
|
|
function BackPressManager() { // fn#99121, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13185:617, offset: 0x00c6223c, size: 113 bytes, params: 1, frame: 20
|
|
const value = environment.__proto__;
|
|
env1_2(this, BackPressManager);
|
|
const value3 = env1_5(BackPressManager);
|
|
return env1_4(this, _isNativeReflectConstruct_99116() ? global.Reflect.construct(value3, arguments,
|
|
env1_5(this).constructor) : value3.apply(this, arguments));
|
|
}
|
|
|
|
function value_99122() { // fn#99122, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13185:916, offset: 0x021bbac1, size: 55 bytes, params: 1, frame: 12
|
|
let value = environment.__proto__;
|
|
value = require(477) /* metro dependency 477: PlatformUtils */;
|
|
if (value.isAndroid()) {
|
|
this._initializeGlobalBackPressListener();
|
|
}
|
|
}
|
|
|
|
function value_99123() { // fn#99123, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13185:1041, offset: 0x021bbaf8, size: 42 bytes, params: 1, frame: 13
|
|
const value = environment.__proto__;
|
|
this._backPressEventSubscription = BackHandler.addEventListener('hardwareBackPress', handleBackPress);
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
global.__d(_fun99115, 12995, [6, 7, 15, 17, 18, 27, 8812, 4022, 1583, 1482, 477, 4561,
|
|
2]) /* metro module 12995, dependencies: [6, 7, 15, 17, 18, 27, 8812, 4022, 1583, 1482, 477, 4561, 2] */;
|