Regression: Crash on Android search (#492)

This commit is contained in:
Diego Mello 2018-10-17 13:30:00 -03:00 committed by GitHub
parent 45788dd129
commit 5ea7d49654
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 4 additions and 9 deletions

View File

@ -129,7 +129,7 @@ class ConnectionBadge extends Component {
const translateY = this.animatedValue.interpolate({ const translateY = this.animatedValue.interpolate({
inputRange: [0, 1], inputRange: [0, 1],
outputRange: [-41, 0] outputRange: [-42, 0]
}); });
if (connecting) { if (connecting) {

View File

@ -496,7 +496,7 @@ const RocketChat = {
AsyncStorage.removeItem(`${ TOKEN_KEY }-${ server }`); AsyncStorage.removeItem(`${ TOKEN_KEY }-${ server }`);
setTimeout(() => { setTimeout(() => {
database.deleteAll(); database.deleteAll();
}, 1000); }, 1500);
}, },
disconnect() { disconnect() {
try { try {

View File

@ -1,4 +1,3 @@
import { Platform } from 'react-native';
import { Navigation } from 'react-native-navigation'; import { Navigation } from 'react-native-navigation';
import { Provider } from 'react-redux'; import { Provider } from 'react-redux';
import { gestureHandlerRootHOC } from 'react-native-gesture-handler'; import { gestureHandlerRootHOC } from 'react-native-gesture-handler';
@ -6,6 +5,7 @@ import { gestureHandlerRootHOC } from 'react-native-gesture-handler';
import OnboardingView from './OnboardingView'; import OnboardingView from './OnboardingView';
import ProfileView from './ProfileView'; import ProfileView from './ProfileView';
import RoomsListHeaderView from './RoomsListView/Header'; import RoomsListHeaderView from './RoomsListView/Header';
import RoomsListSearchView from './RoomsListView/Search';
import RoomsListView from './RoomsListView'; import RoomsListView from './RoomsListView';
import RoomView from './RoomView'; import RoomView from './RoomView';
import SettingsView from './SettingsView'; import SettingsView from './SettingsView';
@ -15,12 +15,7 @@ export const registerScreens = (store) => {
Navigation.registerComponent('OnboardingView', () => OnboardingView, store, Provider); Navigation.registerComponent('OnboardingView', () => OnboardingView, store, Provider);
Navigation.registerComponent('ProfileView', () => ProfileView, store, Provider); Navigation.registerComponent('ProfileView', () => ProfileView, store, Provider);
Navigation.registerComponent('RoomsListHeaderView', () => RoomsListHeaderView, store, Provider); Navigation.registerComponent('RoomsListHeaderView', () => RoomsListHeaderView, store, Provider);
Navigation.registerComponent('RoomsListSearchView', () => RoomsListSearchView, store, Provider);
if (Platform.OS === 'android') {
const RoomsListSearchView = require('./RoomsListView/Search');
Navigation.registerComponent('RoomsListSearchView', () => RoomsListSearchView, store, Provider);
}
Navigation.registerComponent('RoomsListView', () => gestureHandlerRootHOC(RoomsListView), store, Provider); Navigation.registerComponent('RoomsListView', () => gestureHandlerRootHOC(RoomsListView), store, Provider);
Navigation.registerComponent('RoomView', () => gestureHandlerRootHOC(RoomView), store, Provider); Navigation.registerComponent('RoomView', () => gestureHandlerRootHOC(RoomView), store, Provider);
Navigation.registerComponent('SettingsView', () => SettingsView, store, Provider); Navigation.registerComponent('SettingsView', () => SettingsView, store, Provider);