From c9d016376c3de9124b72139518a38d2c996703e7 Mon Sep 17 00:00:00 2001 From: Diego Mello Date: Wed, 25 Sep 2019 18:32:30 -0300 Subject: [PATCH] [FIX] Dispatch roomsRequest on app foreground event even if not connected (#1234) --- app/views/RoomsListView/index.js | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) diff --git a/app/views/RoomsListView/index.js b/app/views/RoomsListView/index.js index a58496687..3d5559a10 100644 --- a/app/views/RoomsListView/index.js +++ b/app/views/RoomsListView/index.js @@ -57,8 +57,7 @@ const shouldUpdateProps = [ 'showUnread', 'useRealName', 'StoreLastMessage', - 'appState', - 'isAuthenticated' + 'appState' ]; const getItemLayout = (data, index) => ({ length: ROW_HEIGHT, @@ -139,8 +138,7 @@ class RoomsListView extends React.Component { openSearchHeader: PropTypes.func, closeSearchHeader: PropTypes.func, appStart: PropTypes.func, - roomsRequest: PropTypes.func, - isAuthenticated: PropTypes.bool + roomsRequest: PropTypes.func }; constructor(props) { @@ -264,8 +262,7 @@ class RoomsListView extends React.Component { showFavorites, showUnread, appState, - roomsRequest, - isAuthenticated + roomsRequest } = this.props; if ( @@ -280,7 +277,6 @@ class RoomsListView extends React.Component { } else if ( appState === 'foreground' && appState !== prevProps.appState - && isAuthenticated ) { roomsRequest(); } @@ -801,7 +797,6 @@ const mapStateToProps = state => ({ userId: state.login.user && state.login.user.id, username: state.login.user && state.login.user.username, token: state.login.user && state.login.user.token, - isAuthenticated: state.login.isAuthenticated, server: state.server.server, baseUrl: state.settings.baseUrl || state.server ? state.server.server : '', searchText: state.rooms.searchText,