46 lines
2.8 KiB
TypeScript
46 lines
2.8 KiB
TypeScript
/* Metro module 16257; source: modules/headless_tasks/android/BackgroundSync.tsx; dependencies: [4257, 1226, 7030, 3, 1926, 15670, 2] */
|
|
import Logger from '../../debug/Logger.tsx'; /* Metro dependency 3 */
|
|
import AuthenticationStore from '../../../stores/AuthenticationStore.tsx'; /* Metro dependency 1226 */
|
|
import GatewayConnectionStore from '../../gateway/GatewayConnectionStore.tsx'; /* Metro dependency 4257 */
|
|
import AppStateStore from '../../../stores/native/AppStateStore.tsx'; /* Metro dependency 7030 */
|
|
import * as FileImportTrackerModule from '../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
|
|
|
|
function _fun125640(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#125640, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16465:6, offset: 0x025dfaea, size: 158 bytes, params: 8, frame: 15
|
|
const env0_0 = require;
|
|
let value = Logger;
|
|
value = new value('BackgroundSync');
|
|
module.exports = exports_125641;
|
|
(FileImportTrackerModule).fileFinishedImporting('modules/headless_tasks/android/BackgroundSync.tsx');
|
|
function exports_125641(a0) { // fn#125641, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16465:120, offset: 0x025dfb88, size: 173 bytes, params: 2, frame: 13
|
|
var r0;
|
|
var defaultImport;
|
|
var carefullyOpenDatabase;
|
|
var authenticationStoreBinding;
|
|
const env0_0 = a0;
|
|
if (AppStateStore.getState() === 'active') {
|
|
r0 = global.Promise.resolve();
|
|
} else {
|
|
if (!(GatewayConnectionStore.isConnected() || GatewayConnectionStore.isTryingToConnect())) {
|
|
defaultImport = importDefault(1926) /* metro dependency 1926: DatabaseManager */;
|
|
carefullyOpenDatabase = defaultImport.carefullyOpenDatabase;
|
|
authenticationStoreBinding = AuthenticationStore;
|
|
Reflect.apply(carefullyOpenDatabase, defaultImport, [authenticationStoreBinding.getId()]);
|
|
}
|
|
r0 = new global.Promise(_fun125642);
|
|
}
|
|
return r0;
|
|
function _fun125642(a0) { // fn#125642, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16465:260, offset: 0x025dfc35, size: 82 bytes, params: 2, frame: 14
|
|
let value = environment.__proto__;
|
|
env1_6.log('Executing BackgroundSync with ', env0_0);
|
|
value = require(15670) /* metro dependency 15670: BackgroundSync */;
|
|
value = value.backgroundSync({});
|
|
value.then(a0);
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
global.__d(_fun125640, 16257, [4257, 1226, 7030, 3, 1926, 15670,
|
|
2]) /* metro module 16257, dependencies: [4257, 1226, 7030, 3, 1926, 15670, 2] */;
|