123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293 |
- // @flow
-
- import '../mdev/conn';
- import '../mdev/dev_sto';
-
- // Apply all necessary polyfills as early as possible to make sure anything imported henceforth
- // sees them.
- import './features/mobile/polyfills';
-
- import React, { PureComponent } from 'react';
- import { AppRegistry } from 'react-native';
-
- import { App } from './features/app/components';
- import { _initLogging } from './features/base/logging/functions';
- import JitsiThemePaperProvider
- from './features/base/ui/components/JitsiThemeProvider';
- import { IncomingCallApp } from './features/mobile/incoming-call';
-
- import '../mdev/ipost';
- console.log("ROOT.index.native")
- window.trc_vs += "_indx=react=native_"
- declare var __DEV__;
-
- /**
- * The type of the React {@code Component} props of {@link Root}.
- */
- type Props = {
-
- /**
- * The URL, if any, with which the app was launched.
- */
- url: Object | string
- };
-
- /**
- * React Native doesn't support specifying props to the main/root component (in
- * the JS/JSX source code). So create a wrapper React Component (class) around
- * features/app's App instead.
- *
- * @extends Component
- */
- class Root extends PureComponent<Props> {
- /**
- * Implements React's {@link Component#render()}.
- *
- * @inheritdoc
- * @returns {ReactElement}
- */
- render() {
- window.trc_vs += "_ROOT=render_"
- console.log("ROOT!...")
- // return (
- var ret = (
- <JitsiThemePaperProvider>
- <App
- { ...this.props } />
- </JitsiThemePaperProvider>
- );
- //
- window.root={r:ret,that:this}
- return ret
- }
- }
-
- // Initialize logging.
- _initLogging();
-
- // HORRIBLE HACK ALERT! React Native logs the initial props with `console.log`. Here we are quickly patching it
- // to avoid logging potentially sensitive information.
- if (!__DEV__) {
- /* eslint-disable */
-
- const __orig_console_log = console.log;
- window.clog3= console.log
- const __orig_appregistry_runapplication = AppRegistry.runApplication;
-
- AppRegistry.runApplication = (...args) => {
- // $FlowExpectedError
- console.log = () => {};
- __orig_appregistry_runapplication(...args);
- // $FlowExpectedError
- console.log = __orig_console_log;
- };
-
- /* eslint-enable */
- }
-
-
- // Register the main/root Component of JitsiMeetView.
- AppRegistry.registerComponent('App', () => Root);
-
- // Register the main/root Component of IncomingCallView.
- AppRegistry.registerComponent('IncomingCallApp', () => IncomingCallApp);
|