decord/beta/source/modules/auth/native/useOrientationLock.tsx
2026-10-01 14:13:23 +00:00

47 lines
1.3 KiB
TypeScript

// Module ID: 15626
// Function ID: 15627
// Name: useOrientationLock
// Dependencies: [19, 4812, 1610, 6363, 7780, 2]
// Exports: default
// Module 15626 (useOrientationLock)
import DeviceUtils from "DeviceUtils" /* 4812 */;
import useWideAuthViewDefault from "useWideAuthView" /* 6363 */;
import react from "react" /* 19 */;
import size from "module_2" /* 2 */;
let tmp;
const MetaQuestUtils = tmp(1610);
const DeviceOrientation = tmp(7780);
const result = size.fileFinishedImporting("modules/auth/native/useOrientationLock.tsx");
export default function usePortraitOrientationOnly() {
let tmp = useWideAuthViewDefault();
let closure_0 = tmp;
const items = [tmp];
const effect = react.useEffect(() => {
let tmp = require;
let obj = DeviceUtils;
let tmp4 = !obj.isIpadOS();
obj.isIpadOS();
if (tmp4) {
const tmpResult = MetaQuestUtils;
tmp4 = !tmpResult.isMetaQuest();
}
if (tmp4) {
tmp4 = !closure_0;
}
closure_0 = tmp4;
if (closure_0) {
const tmpResult2 = DeviceOrientation;
tmpResult2.lockOrientation("PORTRAIT", false);
}
return () => {
const tmp = closure_0;
if (tmp) {
const obj = closure_2_0(closure_2_2[4]);
obj.unlockOrientation({ unlockAfterRotatingToPreviousLock: false });
}
};
}, items);
};