decord/source/modules/launchpad/native/LaunchPadPullTabCache.tsx
github-actions e510164e6b chore: update source for alpha 346.2
Skipped 1 file(s) >100MB (GitHub limit): source/__polyfill/04xxx/module_4759.js (118.4 MB)
2026-09-10 05:38:07 +00:00

103 lines
3.5 KiB
TypeScript

// Module ID: 17002
// Function ID: 17003
// Name: LaunchPadPullTabCache
// Dependencies: [11496, 510, 1115, 5162, 1477, 2]
// Exports: clearLaunchPadPullTabExclusionRect, getLaunchPadPullTabPositionCached, persistLaunchPadPullTabPosition, setLaunchPadPullTabPositionCached
// Module 17002 (LaunchPadPullTabCache)
import Storage2 from "Storage" /* 510 */;
import PlatformUtils from "PlatformUtils" /* 1115 */;
import NativeDeviceSettingsModuleDefault from "NativeDeviceSettingsModule" /* 5162 */;
import LaunchPadConstants from "LaunchPadConstants" /* 11496 */;
import size from "module_2" /* 2 */;
function setLaunchPadPullTabExclusionRect(arg0) {
let tmp = arg0;
if (arg0 === undefined) {
const Storage = Storage2.Storage;
value = Storage.get(LAUNCH_PAD_PULL_TAB_POSITION_CACHE_KEY);
if (value == null) {
value = React4;
}
tmp = value;
}
if (obj.isAndroid()) {
const diff = tmp7(1477).getWindowDimensions().width - hasOwnProperty;
const tmp7Result = tmp7(1477);
const width = tmp7(1477).getWindowDimensions().width;
const sum = tmp + React3;
let left;
if (_undefined != null) {
left = _undefined.left;
}
let tmp15 = left === diff;
if (tmp15) {
let right;
if (_undefined != null) {
right = _undefined.right;
}
tmp15 = right === width;
}
if (tmp15) {
let top;
if (_undefined != null) {
top = _undefined.top;
}
tmp15 = top === tmp;
}
if (tmp15) {
let bottom;
if (_undefined != null) {
bottom = _undefined.bottom;
}
tmp15 = bottom === sum;
}
if (!tmp15) {
const rect = { left: diff, right: width, top: tmp, bottom: sum };
_undefined = rect;
const items = [_undefined];
const result = NativeDeviceSettingsModuleDefault.setSystemGestureExclusionRects(items);
}
const tmp7Result2 = tmp7(1477);
}
}
({ LAUNCH_PAD_PULL_TAB_HEIGHT: c3, LAUNCH_PAD_PULL_TAB_INITIAL_POSITION: closure_4, LAUNCH_PAD_PULL_TAB_WIDTH: hasOwnProperty } = LaunchPadConstants);
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");
export const getLaunchPadPullTabPositionCached = function getLaunchPadPullTabPositionCached() {
const Storage = Storage2.Storage;
value = Storage.get(LAUNCH_PAD_PULL_TAB_POSITION_CACHE_KEY);
if (value == null) {
value = React4;
}
return value;
};
export const setLaunchPadPullTabPositionCached = function setLaunchPadPullTabPositionCached(arg0) {
const Storage = Storage2.Storage;
const result = Storage.set(LAUNCH_PAD_PULL_TAB_POSITION_CACHE_KEY, arg0);
};
export const persistLaunchPadPullTabPosition = function persistLaunchPadPullTabPosition(arg0) {
closure_0 = arg0;
clearTimeout(timeout);
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);
}
}, 300);
};
export const clearLaunchPadPullTabExclusionRect = function clearLaunchPadPullTabExclusionRect() {
let isAndroidResult = PlatformUtils.isAndroid();
if (isAndroidResult) {
isAndroidResult = null != c8;
}
if (isAndroidResult) {
c8 = undefined;
const result = NativeDeviceSettingsModuleDefault.setSystemGestureExclusionRects([]);
}
};
export { setLaunchPadPullTabExclusionRect };