93 lines
4.4 KiB
TypeScript
93 lines
4.4 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] */
|
|
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});
|
|
const env0_2 = importDefault(6) /* metro dependency 6 */;
|
|
const env0_3 = importDefault(7) /* metro dependency 7 */;
|
|
const env0_4 = importDefault(15) /* metro dependency 15 */;
|
|
const env0_5 = importDefault(17) /* metro dependency 17 */;
|
|
const env0_6 = importDefault(18) /* metro dependency 18 */;
|
|
const env0_7 = (require(27) /* metro dependency 27 */).BackHandler;
|
|
let value = importDefault(4561) /* metro dependency 4561: LifecycleManager */;
|
|
value = _fun99120(value);
|
|
value = new value();
|
|
(require(2) /* metro dependency 2 */).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;
|
|
(require(8812) /* metro dependency 8812: ContextMenuStateNative */).hideContextMenu();
|
|
const keyboardType = (require(4022) /* metro dependency 4022: useKeyboardType */).getKeyboardType();
|
|
const KeyboardTypes = (require(1583) /* metro dependency 1583: KeyboardTypes */).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 closure = BackPressManager;
|
|
env0_6(closure, a0);
|
|
return env0_3(closure, [{key: '_initialize', value: value_99122}, {key: '_initializeGlobalBackPressListener',
|
|
value: value_99123}, {key: '_terminate', value: function() {
|
|
var _backPressEventSubscription = this._backPressEventSubscription;
|
|
if (_backPressEventSubscription != null) {
|
|
_backPressEventSubscription.remove();
|
|
}
|
|
}}]);
|
|
}
|
|
|
|
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);
|
|
}
|
|
|