Skipped 1 file(s) >100MB (GitHub limit): source/__polyfill/04xxx/module_4823.js (118.4 MB)
34 lines
1.3 KiB
TypeScript
34 lines
1.3 KiB
TypeScript
// Module ID: 18136
|
|
// Function ID: 18137
|
|
// Name: BackgroundSync
|
|
// Dependencies: [5363, 502, 1896, 3, 2004, 17529, 2]
|
|
|
|
// Module 18136 (BackgroundSync)
|
|
import LoggerDefault from "Logger" /* 3 */;
|
|
import DatabaseManagerDefault from "DatabaseManager" /* 2004 */;
|
|
import background_sync_BackgroundSync from "background_sync/BackgroundSync" /* 17529 */;
|
|
import GatewayConnectionStore from "GatewayConnectionStore" /* 5363 */;
|
|
import AuthenticationStore from "AuthenticationStore" /* 502 */;
|
|
import AppStateStore from "AppStateStore" /* 1896 */;
|
|
|
|
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;
|
|
};
|