decord/alpha/source/modules/auth/native/useOrientationLock.tsx

43 lines
1.2 KiB
TypeScript
Raw Normal View History

// Module ID: 15842
// Function ID: 15843
// Name: useOrientationLock
// Dependencies: [19, 4821, 1610, 6549, 7962, 2]
2026-07-20 16:05:17 +00:00
// Exports: default
// Module 15842 (useOrientationLock)
import DeviceUtils from "DeviceUtils" /* 4821 */;
import useWideAuthViewDefault from "useWideAuthView" /* 6549 */;
import noop from "module_19" /* 19 */;
2026-07-23 10:11:24 +00:00
require = fn;
const size = fn(2);
const result = size.fileFinishedImporting("modules/auth/native/useOrientationLock.tsx");
2026-07-20 16:05:17 +00:00
export default function usePortraitOrientationOnly() {
2026-08-24 06:08:38 +00:00
const tmp = useWideAuthViewDefault();
closure_0 = tmp;
2026-07-20 16:05:17 +00:00
const items = [tmp];
const effect = noop.useEffect(() => {
const isIpadOSResult = DeviceUtils.isIpadOS();
2026-07-29 08:29:29 +00:00
let tmp4 = !isIpadOSResult;
if (!isIpadOSResult) {
tmp4 = !tmp(1610).isMetaQuest();
const tmpResult = tmp(1610);
2026-07-20 16:05:17 +00:00
}
2026-07-29 08:29:29 +00:00
if (tmp4) {
tmp4 = !closure_0;
2026-07-20 16:05:17 +00:00
}
closure_0 = tmp4;
2026-07-29 08:29:29 +00:00
if (tmp4) {
tmp(7962).lockOrientation("PORTRAIT", false);
const tmpResult2 = tmp(7962);
2026-07-20 16:05:17 +00:00
}
return () => {
if (closure_0) {
closure_0(dependencyMap[4]).unlockOrientation({ unlockAfterRotatingToPreviousLock: false });
const obj = closure_0(dependencyMap[4]);
2026-07-20 16:05:17 +00:00
}
};
}, items);
};