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

104 lines
3.5 KiB
TypeScript
Raw Normal View History

// Module ID: 16759
// Function ID: 16760
// Name: LaunchPadPullTabCache
// Dependencies: [10989, 510, 1364, 5453, 1478, 2]
2026-07-29 08:29:29 +00:00
// Exports: clearLaunchPadPullTabExclusionRect, getLaunchPadPullTabPositionCached, persistLaunchPadPullTabPosition, setLaunchPadPullTabPositionCached
2026-07-20 16:05:17 +00:00
// Module 16759 (LaunchPadPullTabCache)
import Storage2 from "Storage" /* 510 */;
import PlatformUtils from "PlatformUtils" /* 1364 */;
import NativeDeviceSettingsModuleDefault from "NativeDeviceSettingsModule" /* 5453 */;
import LaunchPadConstants from "LaunchPadConstants" /* 10989 */;
import size from "module_2" /* 2 */;
2026-07-20 16:05:17 +00:00
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;
value = Storage.get(LAUNCH_PAD_PULL_TAB_POSITION_CACHE_KEY);
2026-07-29 08:29:29 +00:00
if (value == null) {
value = React4;
2026-07-29 08:29:29 +00:00
}
tmp = value;
2026-07-20 16:05:17 +00:00
}
if (obj.isAndroid()) {
const diff = tmp7(1478).getWindowDimensions().width - hasOwnProperty;
const tmp7Result = tmp7(1478);
const width = tmp7(1478).getWindowDimensions().width;
const sum = tmp + React3;
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];
const result = NativeDeviceSettingsModuleDefault.setSystemGestureExclusionRects(items);
2026-07-20 16:05:17 +00:00
}
const tmp7Result2 = tmp7(1478);
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;
value = Storage.get(LAUNCH_PAD_PULL_TAB_POSITION_CACHE_KEY);
2026-07-29 08:29:29 +00:00
if (value == null) {
value = React4;
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-08-24 06:08:38 +00:00
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);
if (null != c8) {
setLaunchPadPullTabExclusionRect(closure_0);
2026-07-20 16:05:17 +00:00
}
}, 300);
};
export const clearLaunchPadPullTabExclusionRect = function clearLaunchPadPullTabExclusionRect() {
let isAndroidResult = PlatformUtils.isAndroid();
2026-07-20 16:05:17 +00:00
if (isAndroidResult) {
2026-07-23 10:11:24 +00:00
isAndroidResult = null != c8;
2026-07-20 16:05:17 +00:00
}
if (isAndroidResult) {
2026-07-23 10:11:24 +00:00
c8 = undefined;
const result = NativeDeviceSettingsModuleDefault.setSystemGestureExclusionRects([]);
2026-07-20 16:05:17 +00:00
}
};
export { setLaunchPadPullTabExclusionRect };