25 lines
1.9 KiB
TypeScript
25 lines
1.9 KiB
TypeScript
/* Metro module 15362; source: modules/activities/native/applyActivityOrientationLock.tsx; dependencies: [4237, 10703, 7717, 2] */
|
|
function _fun117442(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#117442, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15559:6, offset: 0x024b320f, size: 117 bytes, params: 8, frame: 18
|
|
const env0_0 = require;
|
|
const Object = global.Object;
|
|
Object.defineProperty(exports, '__esModule', {value: true});
|
|
const env0_2 = (require(4237) /* metro dependency 4237: Constants */).OrientationLockState;
|
|
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/activities/native/applyActivityOrientationLock.tsx');
|
|
exports.default = applyActivityOrientationLock;
|
|
}
|
|
|
|
function applyActivityOrientationLock(a0) { // fn#117443, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15559:229, offset: 0x024b3284, size: 208 bytes, params: 2, frame: 15
|
|
const getDefaultOrientationLockStateModule = require(10703) /* metro dependency 10703: getDefaultOrientationLockState */;
|
|
const getIsTabletActivitySurface = getDefaultOrientationLockStateModule.getIsTabletActivitySurface;
|
|
if (!Reflect.apply(getIsTabletActivitySurface, getDefaultOrientationLockStateModule, [])) {
|
|
if (OrientationLockState.UNLOCKED === a0) {
|
|
(require(7717) /* metro dependency 7717: DeviceOrientation */).unlockOrientation({unlockAfterRotatingToPreviousLock: true});
|
|
} else if (OrientationLockState.PORTRAIT === a0) {
|
|
(require(7717) /* metro dependency 7717: DeviceOrientation */).lockOrientation('PORTRAIT', true);
|
|
} else if (OrientationLockState.LANDSCAPE === a0) {
|
|
(require(7717) /* metro dependency 7717: DeviceOrientation */).lockOrientation('LANDSCAPE', true);
|
|
}
|
|
}
|
|
}
|
|
|