-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[NEW] Changed navigation library to react-navigation. (#41)
* Changed navigation library to react-navigation. Refactoring on sagas to remove navigation navigation flow do it in views. Added new modal library. Renamed view files to the same name of their classes. Added support to redux-devtools using the chrome extension through Remote devtools menu. Some components was refactored to reduce complexity and more legibility. * Remove react-native-navigation from Android * Adding servers to drawer menu, allowing server switch. * Sidebar component * opss :x fix add server * opss :x fix add server * Fixed add server navigation issues, fixed empty and slow Rooms List and Chat Messages * Disable cleanup everytime * some fixes * some fixes * fix? * . * Fixed logo not displaying when app is loading or signing to server * Fixed logo in loading and login * Update LoginView.js * Update PublicRoutes.js
- Loading branch information
1 parent
909f31b
commit 3c6c266
Showing
46 changed files
with
984 additions
and
804 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
12 changes: 10 additions & 2 deletions
12
android/app/src/main/java/com/rocketchatrn/MainActivity.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,15 @@ | ||
package com.rocketchatrn; | ||
|
||
import com.reactnativenavigation.controllers.SplashActivity; | ||
import com.facebook.react.ReactActivity; | ||
|
||
public class MainActivity extends SplashActivity { | ||
public class MainActivity extends ReactActivity { | ||
|
||
/** | ||
* Returns the name of the main component registered from JavaScript. | ||
* This is used to schedule rendering of the component. | ||
*/ | ||
@Override | ||
protected String getMainComponentName() { | ||
return "RocketChatRN"; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,57 @@ | ||
import PropTypes from 'prop-types'; | ||
import React from 'react'; | ||
import { View, Image } from 'react-native'; | ||
import { bindActionCreators } from 'redux'; | ||
import { connect } from 'react-redux'; | ||
import * as Animatable from 'react-native-animatable'; | ||
import { appInit } from '../actions'; | ||
|
||
import styles from '../views/Styles'; | ||
|
||
import AuthRoutes from './routes/AuthRoutes'; | ||
import PublicRoutes from './routes/PublicRoutes'; | ||
|
||
@connect( | ||
state => ({ | ||
login: state.login, | ||
app: state.app | ||
}), | ||
dispatch => bindActionCreators({ | ||
appInit | ||
}, dispatch) | ||
) | ||
export default class Routes extends React.Component { | ||
static propTypes = { | ||
login: PropTypes.object.isRequired, | ||
app: PropTypes.object.isRequired, | ||
appInit: PropTypes.func.isRequired | ||
} | ||
|
||
componentWillMount() { | ||
this.props.appInit(); | ||
} | ||
render() { | ||
const { login, app } = this.props; | ||
|
||
if (app.starting) { | ||
return ( | ||
<View style={styles.logoContainer}> | ||
<Animatable.Text | ||
animation='pulse' | ||
easing='ease-out' | ||
iterationCount='infinite' | ||
style={{ textAlign: 'center' }} | ||
> | ||
<Image style={styles.logo} source={require('../images/logo.png')} /> | ||
</Animatable.Text> | ||
</View> | ||
); | ||
} | ||
|
||
if ((login.token && !login.failure) || app.ready) { | ||
return (<AuthRoutes />); | ||
} | ||
|
||
return (<PublicRoutes />); | ||
} | ||
} |
Oops, something went wrong.