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

101 lines
3.2 KiB
TypeScript
Raw Normal View History

2026-07-24 07:16:23 +00:00
// Module ID: 15690
// Function ID: 120954
2026-07-20 16:05:17 +00:00
// Name: getLaunchPadPullTabPositionCached
2026-07-24 07:16:23 +00:00
// Dependencies: [10480, 587, 477, 4684, 1450, 2]
2026-07-20 16:05:17 +00:00
// Exports: clearLaunchPadPullTabExclusionRect, persistLaunchPadPullTabPosition
2026-07-24 07:16:23 +00:00
// Module 15690 (getLaunchPadPullTabPositionCached)
2026-07-23 10:11:24 +00:00
import LAUNCH_PAD_SPRING_CONFIG from "LAUNCH_PAD_SPRING_CONFIG";
2026-07-20 16:05:17 +00:00
2026-07-23 10:11:24 +00:00
let closure_3;
let closure_4;
let closure_5;
2026-07-20 16:05:17 +00:00
function getLaunchPadPullTabPositionCached() {
2026-07-23 10:11:24 +00:00
const Storage = require(587) /* Storage */.Storage;
let value = Storage.get(LAUNCH_PAD_PULL_TAB_POSITION_CACHE_KEY);
2026-07-20 16:05:17 +00:00
if (null == value) {
value = closure_4;
}
return value;
}
function setLaunchPadPullTabPositionCached(arg0) {
2026-07-23 10:11:24 +00:00
const Storage = require(587) /* Storage */.Storage;
const result = Storage.set(LAUNCH_PAD_PULL_TAB_POSITION_CACHE_KEY, arg0);
2026-07-20 16:05:17 +00:00
}
function setLaunchPadPullTabExclusionRect() {
let tmp = arg0;
if (arg0 === undefined) {
tmp = getLaunchPadPullTabPositionCached();
}
2026-07-23 10:11:24 +00:00
let obj = require(477) /* set */;
2026-07-20 16:05:17 +00:00
if (obj.isAndroid()) {
2026-07-23 10:11:24 +00:00
const diff = require(1450) /* useWindowDimensions */.getWindowDimensions().width - closure_5;
const obj2 = require(1450) /* useWindowDimensions */;
const width = require(1450) /* useWindowDimensions */.getWindowDimensions().width;
2026-07-20 16:05:17 +00:00
const sum = tmp + closure_3;
let left;
2026-07-23 10:11:24 +00:00
if (null != obj) {
left = obj.left;
2026-07-20 16:05:17 +00:00
}
let tmp11 = left === diff;
if (tmp11) {
let right;
2026-07-23 10:11:24 +00:00
if (null != obj) {
right = obj.right;
2026-07-20 16:05:17 +00:00
}
tmp11 = right === width;
}
if (tmp11) {
let top;
2026-07-23 10:11:24 +00:00
if (null != obj) {
top = obj.top;
2026-07-20 16:05:17 +00:00
}
tmp11 = top === tmp;
}
if (tmp11) {
let bottom;
2026-07-23 10:11:24 +00:00
if (null != obj) {
bottom = obj.bottom;
2026-07-20 16:05:17 +00:00
}
tmp11 = bottom === sum;
}
if (!tmp11) {
obj = { left: diff, right: width, top: tmp, bottom: sum };
2026-07-23 10:11:24 +00:00
const items = [obj];
const result = importDefault(4684).setSystemGestureExclusionRects(items);
const obj5 = importDefault(4684);
2026-07-20 16:05:17 +00:00
}
2026-07-23 10:11:24 +00:00
const obj3 = require(1450) /* useWindowDimensions */;
2026-07-20 16:05:17 +00:00
}
}
2026-07-23 10:11:24 +00:00
({ LAUNCH_PAD_PULL_TAB_HEIGHT: closure_3, LAUNCH_PAD_PULL_TAB_INITIAL_POSITION: closure_4, LAUNCH_PAD_PULL_TAB_WIDTH: closure_5 } = LAUNCH_PAD_SPRING_CONFIG);
const LAUNCH_PAD_PULL_TAB_POSITION_CACHE_KEY = "LAUNCH_PAD_PULL_TAB_POSITION_CACHE_KEY";
let c7 = 0;
let c8;
let result = require("set").fileFinishedImporting("modules/launchpad/native/LaunchPadPullTabCache.tsx");
2026-07-20 16:05:17 +00:00
export { getLaunchPadPullTabPositionCached };
export { setLaunchPadPullTabPositionCached };
export const persistLaunchPadPullTabPosition = function persistLaunchPadPullTabPosition(arg0) {
2026-07-23 10:11:24 +00:00
let closure_0 = arg0;
2026-07-20 16:05:17 +00:00
clearTimeout(timeout);
2026-07-23 10:11:24 +00:00
timeout = setTimeout(() => {
outer1_10(closure_0);
if (null != outer1_8) {
outer1_11(closure_0);
2026-07-20 16:05:17 +00:00
}
}, 300);
};
export const clearLaunchPadPullTabExclusionRect = function clearLaunchPadPullTabExclusionRect() {
2026-07-23 10:11:24 +00:00
let isAndroidResult = require(477) /* set */.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 = importDefault(4684).setSystemGestureExclusionRects([]);
const obj2 = importDefault(4684);
2026-07-20 16:05:17 +00:00
}
};
export { setLaunchPadPullTabExclusionRect };