51 lines
3.3 KiB
TypeScript
51 lines
3.3 KiB
TypeScript
/* Metro module 16228; source: modules/core/native/handleAppStateChanged.tsx; dependencies: [1226, 7030, 661, 3, 20, 694, 4294, 16227, 4884, 3998, 14, 683, 2] */
|
|
import TTITracker from '../../tti_analytics/TTITracker.tsx'; /* Metro dependency 14 */
|
|
import AppStartPerformance from '../../../external/discord_common/js/packages/app-start-performance/AppStartPerformance.tsx'; /* Metro dependency 20 */
|
|
import Dispatcher from '../../../Dispatcher.tsx'; /* Metro dependency 694 */
|
|
import AuthenticationStore from '../../../stores/AuthenticationStore.tsx'; /* Metro dependency 1226 */
|
|
import AppStateStore from '../../../stores/native/AppStateStore.tsx'; /* Metro dependency 7030 */
|
|
import * as FileImportTrackerModule from '../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
|
|
import * as ConstantsModule from '../../../Constants.tsx'; /* Metro dependency 661 */
|
|
|
|
function _fun125480(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#125480, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16436:6, offset: 0x025da14b, size: 208 bytes, params: 8, frame: 19
|
|
const env0_0 = require;
|
|
const Object = global.Object;
|
|
Object.defineProperty(exports, '__esModule', {value: true});
|
|
let value = ConstantsModule;
|
|
const env0_5 = value.AnalyticEvents;
|
|
const env0_6 = value.AppStates;
|
|
value = importDefault(3) /* metro dependency 3: Logger */;
|
|
value = new value('index.native.tsx');
|
|
(FileImportTrackerModule).fileFinishedImporting('modules/core/native/handleAppStateChanged.tsx');
|
|
exports.default = handleAppStateChanged_125481;
|
|
function handleAppStateChanged_125481(a0) { // fn#125481, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16436:284, offset: 0x025da21b, size: 435 bytes, params: 2, frame: 22
|
|
var defaultImport5;
|
|
const state = AppStateStore.getState();
|
|
const defaultImport = AppStartPerformance;
|
|
defaultImport.markAndLog(env0_7, '🏃', 'AppState changing from ' + state + ' to ' + a0);
|
|
(Dispatcher).dispatch({type: 'APP_STATE_UPDATE', state: a0});
|
|
const BACKGROUND = AppStates.BACKGROUND;
|
|
let r3 = state === BACKGROUND && a0 === AppStates.ACTIVE;
|
|
let ACTIVE = AppStates.ACTIVE;
|
|
const r2 = state === ACTIVE && a0 !== AppStates.ACTIVE;
|
|
r3 = r3 && AuthenticationStore.isAuthenticated() && (require(4294) /* metro dependency 4294: RTCConnectionStore */).default.isDisconnected();
|
|
if (r3) {
|
|
(importDefault(16227) /* metro dependency 16227: BundleUpdaterActionCreators */).deferUpdate();
|
|
}
|
|
ACTIVE = AppStates.ACTIVE;
|
|
if (a0 === ACTIVE) {
|
|
(require(4884) /* metro dependency 4884: TTIAnalyticsUtils */).trackAppOpened('launcher');
|
|
(require(3998) /* metro dependency 3998: ThemeActionCreators */).setSystemThemeIfNeeded();
|
|
}
|
|
(TTITracker).appStateChanged(a0);
|
|
if (r2) {
|
|
defaultImport5 = importDefault(683) /* metro dependency 683: AnalyticsUtils */;
|
|
defaultImport5.track(AnalyticEvents.APP_BACKGROUND, {});
|
|
}
|
|
}
|
|
|
|
}
|
|
|
|
global.__d(_fun125480, 16228, [1226, 7030, 661, 3, 20, 694, 4294, 16227, 4884, 3998, 14, 683,
|
|
2]) /* metro module 16228, dependencies: [1226, 7030, 661, 3, 20, 694, 4294, 16227, 4884, 3998, 14, 683, 2] */;
|