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

109 lines
3.4 KiB
TypeScript
Raw Normal View History

2026-08-15 05:55:55 +00:00
// Module ID: 16180
// Function ID: 16181
2026-07-29 08:29:29 +00:00
// Name: setLaunchPadPullTabExclusionRect
2026-08-15 05:55:55 +00:00
// Dependencies: [10665, 595, 500, 4849, 1494, 2]
2026-07-29 08:29:29 +00:00
// Exports: clearLaunchPadPullTabExclusionRect, getLaunchPadPullTabPositionCached, persistLaunchPadPullTabPosition, setLaunchPadPullTabPositionCached
2026-07-20 16:05:17 +00:00
2026-08-15 05:55:55 +00:00
// Module 16180 (setLaunchPadPullTabExclusionRect)
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-29 08:29:29 +00:00
let c3;
let c4;
let c5;
2026-07-20 16:05:17 +00:00
function setLaunchPadPullTabExclusionRect() {
let tmp = arg0;
if (arg0 === undefined) {
2026-07-29 08:29:29 +00:00
const Storage = require(595) /* Storage */.Storage;
let value = Storage.get(LAUNCH_PAD_PULL_TAB_POSITION_CACHE_KEY);
if (value == null) {
value = closure_4;
}
tmp = value;
2026-07-20 16:05:17 +00:00
}
2026-07-29 08:29:29 +00:00
let obj = require(500) /* set */;
2026-07-20 16:05:17 +00:00
if (obj.isAndroid()) {
2026-08-15 05:55:55 +00:00
let tmp7Result = tmp7(1494);
2026-07-29 08:29:29 +00:00
const diff = tmp7Result.getWindowDimensions().width - closure_5;
2026-08-15 05:55:55 +00:00
tmp7Result = tmp7(1494);
2026-07-29 08:29:29 +00:00
const width = tmp7Result.getWindowDimensions().width;
2026-07-20 16:05:17 +00:00
const sum = tmp + closure_3;
let left;
2026-07-29 08:29:29 +00:00
if (obj != null) {
2026-07-23 10:11:24 +00:00
left = obj.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;
2026-07-29 08:29:29 +00:00
if (obj != null) {
2026-07-23 10:11:24 +00:00
right = obj.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;
2026-07-29 08:29:29 +00:00
if (obj != null) {
2026-07-23 10:11:24 +00:00
top = obj.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;
2026-07-29 08:29:29 +00:00
if (obj != null) {
2026-07-23 10:11:24 +00:00
bottom = obj.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) {
obj = { left: null, right: null, top: null, bottom: null };
obj[0] = diff;
obj[1] = width;
obj[2] = tmp;
obj[3] = sum;
2026-07-23 10:11:24 +00:00
const items = [obj];
2026-08-15 05:55:55 +00:00
const result = importDefault(4849).setSystemGestureExclusionRects(items);
const obj5 = importDefault(4849);
2026-07-20 16:05:17 +00:00
}
}
}
2026-07-29 08:29:29 +00:00
({ LAUNCH_PAD_PULL_TAB_HEIGHT: c3, LAUNCH_PAD_PULL_TAB_INITIAL_POSITION: c4, LAUNCH_PAD_PULL_TAB_WIDTH: c5 } = LAUNCH_PAD_SPRING_CONFIG);
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 = require("set").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() {
const Storage = require(595) /* Storage */.Storage;
let value = Storage.get(LAUNCH_PAD_PULL_TAB_POSITION_CACHE_KEY);
if (value == null) {
value = closure_4;
}
return value;
};
export const setLaunchPadPullTabPositionCached = function setLaunchPadPullTabPositionCached(arg0) {
const Storage = require(595) /* Storage */.Storage;
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-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(() => {
2026-07-29 08:29:29 +00:00
const Storage = callback(outer1_2[1]).Storage;
const result = Storage.set(outer1_6, callback);
2026-07-23 10:11:24 +00:00
if (null != outer1_8) {
2026-07-29 08:29:29 +00:00
outer1_9(callback);
2026-07-20 16:05:17 +00:00
}
}, 300);
};
export const clearLaunchPadPullTabExclusionRect = function clearLaunchPadPullTabExclusionRect() {
2026-07-29 08:29:29 +00:00
let isAndroidResult = require(500) /* 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;
2026-08-15 05:55:55 +00:00
const result = importDefault(4849).setSystemGestureExclusionRects([]);
const obj2 = importDefault(4849);
2026-07-20 16:05:17 +00:00
}
};
export { setLaunchPadPullTabExclusionRect };