decord/alpha/source/modules/launchpad/native/LaunchPadPullTabCache.tsx

114 lines
3.7 KiB
TypeScript
Raw Normal View History

2026-10-12 06:59:38 +00:00
// Module ID: 17975
// Function ID: 17976
// Name: LaunchPadPullTabCache
2026-10-12 06:59:38 +00:00
// Dependencies: [10659, 510, 1382, 6625, 1497, 2]
2026-07-29 08:29:29 +00:00
// Exports: clearLaunchPadPullTabExclusionRect, getLaunchPadPullTabPositionCached, persistLaunchPadPullTabPosition, setLaunchPadPullTabPositionCached
2026-07-20 16:05:17 +00:00
2026-10-12 06:59:38 +00:00
// Module 17975 (LaunchPadPullTabCache)
import Storage2 from "Storage" /* 510 */;
2026-10-09 10:00:15 +00:00
import PlatformUtils from "PlatformUtils" /* 1382 */;
import useWindowDimensions from "useWindowDimensions" /* 1497 */;
2026-10-12 06:59:38 +00:00
import react_nativeDefault from "react-native" /* 6625 */;
2026-10-10 08:08:14 +00:00
import LaunchPadConstants from "LaunchPadConstants" /* 10659 */;
import size from "module_2" /* 2 */;
2026-07-20 16:05:17 +00:00
2026-10-03 08:58:59 +00:00
let _undefined;
let c3;
let closure_4;
let hasOwnProperty;
function setLaunchPadPullTabExclusionRect(arg0) {
2026-07-20 16:05:17 +00:00
let tmp = arg0;
if (arg0 === undefined) {
2026-08-24 06:08:38 +00:00
const Storage = Storage2.Storage;
2026-10-03 08:58:59 +00:00
let value = Storage.get(LAUNCH_PAD_PULL_TAB_POSITION_CACHE_KEY);
2026-07-29 08:29:29 +00:00
if (value == null) {
2026-10-03 08:58:59 +00:00
value = React3;
2026-07-29 08:29:29 +00:00
}
tmp = value;
2026-07-20 16:05:17 +00:00
}
2026-10-03 08:58:59 +00:00
const obj = PlatformUtils;
2026-07-20 16:05:17 +00:00
if (obj.isAndroid()) {
2026-10-03 08:58:59 +00:00
const tmp7Result = useWindowDimensions;
const diff = tmp7Result.getWindowDimensions().width - hasOwnProperty;
const tmp7Result2 = useWindowDimensions;
const width = tmp7Result2.getWindowDimensions().width;
const sum = tmp + _false;
2026-07-20 16:05:17 +00:00
let left;
if (_undefined != null) {
left = _undefined.left;
2026-07-20 16:05:17 +00:00
}
2026-07-29 08:29:29 +00:00
let tmp15 = left === diff;
if (tmp15) {
2026-07-20 16:05:17 +00:00
let right;
if (_undefined != null) {
right = _undefined.right;
2026-07-20 16:05:17 +00:00
}
2026-07-29 08:29:29 +00:00
tmp15 = right === width;
2026-07-20 16:05:17 +00:00
}
2026-07-29 08:29:29 +00:00
if (tmp15) {
2026-07-20 16:05:17 +00:00
let top;
if (_undefined != null) {
top = _undefined.top;
2026-07-20 16:05:17 +00:00
}
2026-07-29 08:29:29 +00:00
tmp15 = top === tmp;
2026-07-20 16:05:17 +00:00
}
2026-07-29 08:29:29 +00:00
if (tmp15) {
2026-07-20 16:05:17 +00:00
let bottom;
if (_undefined != null) {
bottom = _undefined.bottom;
2026-07-20 16:05:17 +00:00
}
2026-07-29 08:29:29 +00:00
tmp15 = bottom === sum;
2026-07-20 16:05:17 +00:00
}
2026-07-29 08:29:29 +00:00
if (!tmp15) {
const rect = { left: diff, right: width, top: tmp, bottom: sum };
_undefined = rect;
const items = [_undefined];
2026-10-03 08:58:59 +00:00
const obj5 = react_nativeDefault;
const result = obj5.setSystemGestureExclusionRects(items);
2026-07-20 16:05:17 +00:00
}
}
}
({ LAUNCH_PAD_PULL_TAB_HEIGHT: c3, LAUNCH_PAD_PULL_TAB_INITIAL_POSITION: closure_4, LAUNCH_PAD_PULL_TAB_WIDTH: hasOwnProperty } = LaunchPadConstants);
2026-07-23 10:11:24 +00:00
const LAUNCH_PAD_PULL_TAB_POSITION_CACHE_KEY = "LAUNCH_PAD_PULL_TAB_POSITION_CACHE_KEY";
let c7 = 0;
let c8;
let result = size.fileFinishedImporting("modules/launchpad/native/LaunchPadPullTabCache.tsx");
2026-07-20 16:05:17 +00:00
2026-07-29 08:29:29 +00:00
export const getLaunchPadPullTabPositionCached = function getLaunchPadPullTabPositionCached() {
2026-08-24 06:08:38 +00:00
const Storage = Storage2.Storage;
2026-10-03 08:58:59 +00:00
let value = Storage.get(LAUNCH_PAD_PULL_TAB_POSITION_CACHE_KEY);
2026-07-29 08:29:29 +00:00
if (value == null) {
2026-10-03 08:58:59 +00:00
value = React3;
2026-07-29 08:29:29 +00:00
}
return value;
};
export const setLaunchPadPullTabPositionCached = function setLaunchPadPullTabPositionCached(arg0) {
2026-08-24 06:08:38 +00:00
const Storage = Storage2.Storage;
2026-07-29 08:29:29 +00:00
const result = Storage.set(LAUNCH_PAD_PULL_TAB_POSITION_CACHE_KEY, arg0);
};
2026-07-20 16:05:17 +00:00
export const persistLaunchPadPullTabPosition = function persistLaunchPadPullTabPosition(arg0) {
2026-10-03 08:58:59 +00:00
let closure_7;
let timeout;
let closure_0 = arg0;
2026-07-20 16:05:17 +00:00
clearTimeout(timeout);
2026-07-23 10:11:24 +00:00
timeout = setTimeout(() => {
const Storage = Storage2.Storage;
const result = Storage.set(LAUNCH_PAD_PULL_TAB_POSITION_CACHE_KEY, closure_0);
2026-10-03 08:58:59 +00:00
const tmp = closure_0;
if (null != c8) {
2026-10-03 08:58:59 +00:00
setLaunchPadPullTabExclusionRect(tmp);
2026-07-20 16:05:17 +00:00
}
}, 300);
};
export const clearLaunchPadPullTabExclusionRect = function clearLaunchPadPullTabExclusionRect() {
2026-10-03 08:58:59 +00:00
const obj = PlatformUtils;
const isAndroidResult = obj.isAndroid() && null != c8;
2026-07-20 16:05:17 +00:00
if (isAndroidResult) {
2026-07-23 10:11:24 +00:00
c8 = undefined;
2026-10-03 08:58:59 +00:00
const obj2 = react_nativeDefault;
const result = obj2.setSystemGestureExclusionRects([]);
2026-07-20 16:05:17 +00:00
}
};
export { setLaunchPadPullTabExclusionRect };