decord/source/modules/headless_tasks/android/BackgroundSync.tsx
github-actions 777dc50a28 chore: update source for alpha 346.3
Skipped 1 file(s) >100MB (GitHub limit): source/__polyfill/04xxx/module_4790.js (118.4 MB)
2026-09-10 19:12:31 +00:00

34 lines
1.3 KiB
TypeScript

// Module ID: 18020
// Function ID: 18021
// Name: BackgroundSync
// Dependencies: [5327, 502, 1895, 3, 2003, 17414, 2]
// Module 18020 (BackgroundSync)
import LoggerDefault from "Logger" /* 3 */;
import DatabaseManagerDefault from "DatabaseManager" /* 2003 */;
import background_sync_BackgroundSync from "background_sync/BackgroundSync" /* 17414 */;
import GatewayConnectionStore from "GatewayConnectionStore" /* 5327 */;
import AuthenticationStore from "AuthenticationStore" /* 502 */;
import AppStateStore from "AppStateStore" /* 1895 */;
require = fn;
let closure_6 = new LoggerDefault("BackgroundSync");
const size = fn(2);
let result = size.fileFinishedImporting("modules/headless_tasks/android/BackgroundSync.tsx");
export default (arg0) => {
closure_0 = arg0;
if ("active" === AppStateStore.getState()) {
let resolved = Promise.resolve();
} else {
if (!tmp) {
const result = DatabaseManagerDefault.carefullyOpenDatabase(AuthenticationStore.getId());
}
resolved = new Promise((arg0) => {
logger.log("Executing BackgroundSync with ", closure_0);
background_sync_BackgroundSync.backgroundSync({}).then(arg0);
});
tmp = GatewayConnectionStore.isConnected() || GatewayConnectionStore.isTryingToConnect();
}
return resolved;
};