diff --git a/app/containers/Avatar.js b/app/containers/Avatar.js index fa1a15c40..6587fecea 100644 --- a/app/containers/Avatar.js +++ b/app/containers/Avatar.js @@ -20,7 +20,9 @@ const styles = StyleSheet.create({ class Avatar extends React.PureComponent { render() { - const { text = '', size = 25, baseUrl, borderRadius = 5, style, avatar } = this.props; + const { + text = '', size = 25, baseUrl, borderRadius = 5, style, avatar + } = this.props; const { initials, color } = avatarInitialsAndColor(`${ text }`); const iconContainerStyle = { diff --git a/app/containers/message/PhotoModal.js b/app/containers/message/PhotoModal.js index a1cf0ff60..b0758c619 100644 --- a/app/containers/message/PhotoModal.js +++ b/app/containers/message/PhotoModal.js @@ -34,7 +34,9 @@ export default class extends React.PureComponent { onClose: PropTypes.func.isRequired } render() { - const { image, isVisible, onClose, title } = this.props; + const { + image, isVisible, onClose, title + } = this.props; return ( diff --git a/app/containers/routes/AuthRoutes.js b/app/containers/routes/AuthRoutes.js index 2c1a9f35e..1e52274e4 100644 --- a/app/containers/routes/AuthRoutes.js +++ b/app/containers/routes/AuthRoutes.js @@ -38,7 +38,7 @@ const AuthRoutes = StackNavigator( title: navigation.state.params.title || 'Room', headerLeft: ( backToScreen(navigation, 'RoomsList')} /> ) diff --git a/app/lib/createStore.js b/app/lib/createStore.js index 5720a5b6a..7a2f79a52 100644 --- a/app/lib/createStore.js +++ b/app/lib/createStore.js @@ -18,9 +18,7 @@ if (__DEV__) { applyMiddleware(logger) ); } else { - enhacers = composeWithDevTools( - applyMiddleware(sagaMiddleware) - ); + enhacers = composeWithDevTools(applyMiddleware(sagaMiddleware)); } const store = enhacers(createStore)(reducers); diff --git a/app/reducers/connect.js b/app/reducers/connect.js index b1f181b58..0aad57c34 100644 --- a/app/reducers/connect.js +++ b/app/reducers/connect.js @@ -10,17 +10,20 @@ const initialState = { export default function connect(state = initialState, action) { switch (action.type) { case METEOR.REQUEST: - return { ...state, + return { + ...state, connecting: true }; case METEOR.SUCCESS: - return { ...state, + return { + ...state, connecting: false, connected: true, failure: false }; case METEOR.FAILURE: - return { ...state, + return { + ...state, connecting: false, connected: false, failure: true, diff --git a/app/reducers/login.js b/app/reducers/login.js index fc0d94227..81ff98c3c 100644 --- a/app/reducers/login.js +++ b/app/reducers/login.js @@ -12,14 +12,16 @@ const initialState = { export default function login(state = initialState, action) { switch (action.type) { case types.LOGIN.REQUEST: - return { ...state, + return { + ...state, isFetching: true, isAuthenticated: false, failure: false, error: '' }; case types.LOGIN.SUCCESS: - return { ...state, + return { + ...state, isFetching: false, isAuthenticated: true, user: action.user, @@ -28,7 +30,8 @@ export default function login(state = initialState, action) { error: '' }; case types.LOGIN.FAILURE: - return { ...state, + return { + ...state, isFetching: false, isAuthenticated: false, failure: true, @@ -37,7 +40,8 @@ export default function login(state = initialState, action) { case types.LOGOUT: return initialState; case types.LOGIN.SET_TOKEN: - return { ...state, + return { + ...state, token: action.token, user: action.user }; diff --git a/app/reducers/messages.js b/app/reducers/messages.js index c0fb2749f..94f0f4f1f 100644 --- a/app/reducers/messages.js +++ b/app/reducers/messages.js @@ -8,15 +8,18 @@ const initialState = { export default function messages(state = initialState, action) { switch (action.type) { case types.MESSAGES.REQUEST: - return { ...state, + return { + ...state, isFetching: true }; case types.MESSAGES.SUCCESS: - return { ...state, + return { + ...state, isFetching: false }; case types.LOGIN.FAILURE: - return { ...state, + return { + ...state, isFetching: false, failure: true, errorMessage: action.err diff --git a/app/reducers/navigator.js b/app/reducers/navigator.js index 75c2cf09b..5660551c7 100644 --- a/app/reducers/navigator.js +++ b/app/reducers/navigator.js @@ -5,8 +5,7 @@ const initialState = {}; export default function navigations(state = initialState, action) { switch (action.type) { case types.NAVIGATION.SET: - return action.navigator - ; + return action.navigator; default: return state; } diff --git a/app/reducers/reducers.js b/app/reducers/reducers.js index 561e609bb..059acd6fb 100644 --- a/app/reducers/reducers.js +++ b/app/reducers/reducers.js @@ -3,7 +3,8 @@ import initialState from './initialState'; export default function settings(state = initialState.settings, action) { if (action.type === types.SET_ALL_SETTINGS) { - return { ...state, + return { + ...state, ...action.payload }; } diff --git a/app/reducers/rooms.js b/app/reducers/rooms.js index 5964a0d7d..bd7ac7e98 100644 --- a/app/reducers/rooms.js +++ b/app/reducers/rooms.js @@ -8,15 +8,18 @@ const initialState = { export default function login(state = initialState, action) { switch (action.type) { case types.ROOMS.REQUEST: - return { ...state, + return { + ...state, isFetching: true }; case types.ROOMS.SUCCESS: - return { ...state, + return { + ...state, isFetching: false }; case types.ROOMS.FAILURE: - return { ...state, + return { + ...state, isFetching: false, failure: true, errorMessage: action.err diff --git a/app/reducers/server.js b/app/reducers/server.js index ea0315e25..337c393e8 100644 --- a/app/reducers/server.js +++ b/app/reducers/server.js @@ -12,18 +12,21 @@ const initialState = { export default function server(state = initialState, action) { switch (action.type) { case SERVER.REQUEST: - return { ...state, + return { + ...state, connecting: true, failure: false }; case SERVER.SUCCESS: - return { ...state, + return { + ...state, connecting: false, connected: true, failure: false }; case SERVER.FAILURE: - return { ...state, + return { + ...state, connecting: false, connected: false, failure: true, diff --git a/app/views/ForgotPasswordView.js b/app/views/ForgotPasswordView.js index c8a0ece15..92f28cbce 100644 --- a/app/views/ForgotPasswordView.js +++ b/app/views/ForgotPasswordView.js @@ -97,7 +97,7 @@ class ForgotPasswordView extends React.Component { {this.props.login.failure && {this.props.login.error.reason}} - + diff --git a/app/views/Photo.js b/app/views/Photo.js index e457fb6ba..e68597543 100644 --- a/app/views/Photo.js +++ b/app/views/Photo.js @@ -27,7 +27,7 @@ export default class extends React.PureComponent { style={{ ...styles.image }} source={{ uri: encodeURI(image) }} mutable - resizeMode={'contain'} + resizeMode='contain' /> diff --git a/app/views/SelectUsersView.js b/app/views/SelectUsersView.js index e23d2a98c..9514b216c 100644 --- a/app/views/SelectUsersView.js +++ b/app/views/SelectUsersView.js @@ -87,10 +87,10 @@ export default class RoomsListView extends React.Component { .filtered('_server.id = $0 AND t = $1', this.props.server, 'd'); this.state = { dataSource: ds.cloneWithRows(this.data), - searching: false, - searchDataSource: [], - searchText: '', - login: false + // searching: false, + // searchDataSource: [], + searchText: '' + // login: false }; this.data.addListener(this.updateState); } @@ -103,8 +103,8 @@ export default class RoomsListView extends React.Component { onSearchChangeText = (text) => { const searchText = text.trim(); this.setState({ - searchText: text, - searching: searchText !== '' + searchText: text + // searching: searchText !== '' }); if (searchText === '') { return this.setState({ diff --git a/storybook/stories/Avatar.js b/storybook/stories/Avatar.js index 40850c51a..e3dffec74 100644 --- a/storybook/stories/Avatar.js +++ b/storybook/stories/Avatar.js @@ -5,9 +5,9 @@ import Avatar from '../../app/containers/Avatar'; export default ( - - - - + + + + );