Lint
This commit is contained in:
parent
ff5b5b33cc
commit
0b0e768ff2
59
app/index.js
59
app/index.js
|
@ -1,3 +1,4 @@
|
||||||
|
/* eslint-disable */
|
||||||
import React from 'react';
|
import React from 'react';
|
||||||
import { Linking } from 'react-native';
|
import { Linking } from 'react-native';
|
||||||
import { AppearanceProvider } from 'react-native-appearance';
|
import { AppearanceProvider } from 'react-native-appearance';
|
||||||
|
@ -27,7 +28,7 @@ import {
|
||||||
isTablet, isIOS, setWidth, supportSystemTheme
|
isTablet, isIOS, setWidth, supportSystemTheme
|
||||||
} from './utils/deviceInfo';
|
} from './utils/deviceInfo';
|
||||||
import { KEY_COMMAND } from './commands';
|
import { KEY_COMMAND } from './commands';
|
||||||
import Tablet, { initTabletNav } from './tablet';
|
// import Tablet, { initTabletNav } from './tablet.js__';
|
||||||
import { SplitContext } from './split';
|
import { SplitContext } from './split';
|
||||||
import AppContainer from './AppContainer';
|
import AppContainer from './AppContainer';
|
||||||
import TwoFactor from './containers/TwoFactor';
|
import TwoFactor from './containers/TwoFactor';
|
||||||
|
@ -65,9 +66,9 @@ export default class Root extends React.Component {
|
||||||
darkLevel: 'dark'
|
darkLevel: 'dark'
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
if (isTablet) {
|
// if (isTablet) {
|
||||||
this.initTablet();
|
// this.initTablet();
|
||||||
}
|
// }
|
||||||
}
|
}
|
||||||
|
|
||||||
componentDidMount() {
|
componentDidMount() {
|
||||||
|
@ -129,14 +130,14 @@ export default class Root extends React.Component {
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
initTablet = async() => {
|
// initTablet = async() => {
|
||||||
initTabletNav(args => this.setState(args));
|
// initTabletNav(args => this.setState(args));
|
||||||
await KeyCommands.setKeyCommands([]);
|
// await KeyCommands.setKeyCommands([]);
|
||||||
this.onKeyCommands = KeyCommandsEmitter.addListener(
|
// this.onKeyCommands = KeyCommandsEmitter.addListener(
|
||||||
'onKeyCommand',
|
// 'onKeyCommand',
|
||||||
command => EventEmitter.emit(KEY_COMMAND, { event: command })
|
// command => EventEmitter.emit(KEY_COMMAND, { event: command })
|
||||||
);
|
// );
|
||||||
}
|
// }
|
||||||
|
|
||||||
initCrashReport = () => {
|
initCrashReport = () => {
|
||||||
RocketChat.getAllowCrashReport()
|
RocketChat.getAllowCrashReport()
|
||||||
|
@ -163,23 +164,23 @@ export default class Root extends React.Component {
|
||||||
|
|
||||||
let content = <AppContainer />;
|
let content = <AppContainer />;
|
||||||
|
|
||||||
if (isTablet) {
|
// if (isTablet) {
|
||||||
const { inside, showModal } = this.state;
|
// const { inside, showModal } = this.state;
|
||||||
content = (
|
// content = (
|
||||||
<SplitContext.Provider value={{ split }}>
|
// <SplitContext.Provider value={{ split }}>
|
||||||
<Tablet
|
// <Tablet
|
||||||
theme={theme}
|
// theme={theme}
|
||||||
tablet={split}
|
// tablet={split}
|
||||||
inside={inside}
|
// inside={inside}
|
||||||
showModal={showModal}
|
// showModal={showModal}
|
||||||
closeModal={this.closeModal}
|
// closeModal={this.closeModal}
|
||||||
onLayout={this.onLayout}
|
// onLayout={this.onLayout}
|
||||||
>
|
// >
|
||||||
{content}
|
// {content}
|
||||||
</Tablet>
|
// </Tablet>
|
||||||
</SplitContext.Provider>
|
// </SplitContext.Provider>
|
||||||
);
|
// );
|
||||||
}
|
// }
|
||||||
return (
|
return (
|
||||||
<AppearanceProvider>
|
<AppearanceProvider>
|
||||||
<Provider store={store}>
|
<Provider store={store}>
|
||||||
|
|
|
@ -7,7 +7,9 @@ import moment from 'moment';
|
||||||
import 'moment/min/locales';
|
import 'moment/min/locales';
|
||||||
|
|
||||||
import * as types from '../actions/actionsTypes';
|
import * as types from '../actions/actionsTypes';
|
||||||
import { appStart, ROOT_SET_USERNAME, ROOT_INSIDE, ROOT_LOADING, ROOT_OUTSIDE } from '../actions/app';
|
import {
|
||||||
|
appStart, ROOT_SET_USERNAME, ROOT_INSIDE, ROOT_LOADING, ROOT_OUTSIDE
|
||||||
|
} from '../actions/app';
|
||||||
import { serverFinishAdd, selectServerRequest } from '../actions/server';
|
import { serverFinishAdd, selectServerRequest } from '../actions/server';
|
||||||
import {
|
import {
|
||||||
loginFailure, loginSuccess, setUser, logout
|
loginFailure, loginSuccess, setUser, logout
|
||||||
|
|
|
@ -1,5 +1,4 @@
|
||||||
import React, { useState, useContext } from 'react';
|
import React, { useContext } from 'react';
|
||||||
import { View } from 'react-native';
|
|
||||||
import PropTypes from 'prop-types';
|
import PropTypes from 'prop-types';
|
||||||
import { NavigationContainer } from '@react-navigation/native';
|
import { NavigationContainer } from '@react-navigation/native';
|
||||||
import { AppearanceProvider } from 'react-native-appearance';
|
import { AppearanceProvider } from 'react-native-appearance';
|
||||||
|
|
|
@ -10,7 +10,7 @@ import StatusBar from '../containers/StatusBar';
|
||||||
import ActivityIndicator from '../containers/ActivityIndicator';
|
import ActivityIndicator from '../containers/ActivityIndicator';
|
||||||
import { withTheme } from '../theme';
|
import { withTheme } from '../theme';
|
||||||
import debounce from '../utils/debounce';
|
import debounce from '../utils/debounce';
|
||||||
import { LegalButton, CloseModalButton } from '../containers/HeaderButton';
|
import { CloseModalButton } from '../containers/HeaderButton';
|
||||||
|
|
||||||
const userAgent = isIOS
|
const userAgent = isIOS
|
||||||
? 'Mozilla/5.0 (iPhone; CPU iPhone OS 10_3_1 like Mac OS X) AppleWebKit/603.1.30 (KHTML, like Gecko) Version/10.0 Mobile/14E304 Safari/602.1'
|
? 'Mozilla/5.0 (iPhone; CPU iPhone OS 10_3_1 like Mac OS X) AppleWebKit/603.1.30 (KHTML, like Gecko) Version/10.0 Mobile/14E304 Safari/602.1'
|
||||||
|
|
|
@ -6,7 +6,6 @@ import {
|
||||||
import RNUserDefaults from 'rn-user-defaults';
|
import RNUserDefaults from 'rn-user-defaults';
|
||||||
|
|
||||||
import I18n from '../i18n';
|
import I18n from '../i18n';
|
||||||
import { themedHeader } from '../utils/navigation';
|
|
||||||
import { withTheme } from '../theme';
|
import { withTheme } from '../theme';
|
||||||
import { themes } from '../constants/colors';
|
import { themes } from '../constants/colors';
|
||||||
import sharedStyles from './Styles';
|
import sharedStyles from './Styles';
|
||||||
|
|
|
@ -3,7 +3,6 @@ import PropTypes from 'prop-types';
|
||||||
import { StyleSheet } from 'react-native';
|
import { StyleSheet } from 'react-native';
|
||||||
import { HeaderBackButton } from '@react-navigation/stack';
|
import { HeaderBackButton } from '@react-navigation/stack';
|
||||||
|
|
||||||
import { isIOS } from '../../../utils/deviceInfo';
|
|
||||||
import { themes } from '../../../constants/colors';
|
import { themes } from '../../../constants/colors';
|
||||||
import Avatar from '../../../containers/Avatar';
|
import Avatar from '../../../containers/Avatar';
|
||||||
|
|
||||||
|
|
|
@ -4,7 +4,6 @@ import { StyleSheet, Switch, ScrollView } from 'react-native';
|
||||||
import { connect } from 'react-redux';
|
import { connect } from 'react-redux';
|
||||||
|
|
||||||
import I18n from '../i18n';
|
import I18n from '../i18n';
|
||||||
import { themedHeader } from '../utils/navigation';
|
|
||||||
import { withTheme } from '../theme';
|
import { withTheme } from '../theme';
|
||||||
import { themes, SWITCH_TRACK_COLOR } from '../constants/colors';
|
import { themes, SWITCH_TRACK_COLOR } from '../constants/colors';
|
||||||
import StatusBar from '../containers/StatusBar';
|
import StatusBar from '../containers/StatusBar';
|
||||||
|
|
|
@ -6,7 +6,6 @@ import {
|
||||||
import RNUserDefaults from 'rn-user-defaults';
|
import RNUserDefaults from 'rn-user-defaults';
|
||||||
|
|
||||||
import I18n from '../i18n';
|
import I18n from '../i18n';
|
||||||
import { themedHeader } from '../utils/navigation';
|
|
||||||
import { withTheme } from '../theme';
|
import { withTheme } from '../theme';
|
||||||
import { themes } from '../constants/colors';
|
import { themes } from '../constants/colors';
|
||||||
import sharedStyles from './Styles';
|
import sharedStyles from './Styles';
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
import React from 'react';
|
import React from 'react';
|
||||||
import { ScrollView, View, StyleSheet } from 'react-native';
|
import { ScrollView, View, StyleSheet } from 'react-native';
|
||||||
import { HeaderBackButton } from 'react-navigation-stack';
|
import { HeaderBackButton } from '@react-navigation/stack';
|
||||||
|
|
||||||
import HeaderComponent from '../../app/views/RoomView/Header/Header';
|
import HeaderComponent from '../../app/views/RoomView/Header/Header';
|
||||||
// import { CustomHeaderButtons, Item } from '../../app/containers/HeaderButton';
|
// import { CustomHeaderButtons, Item } from '../../app/containers/HeaderButton';
|
||||||
|
|
Loading…
Reference in New Issue