From 0fdb8f2e465495446fb9361e4c140e7fd203fc32 Mon Sep 17 00:00:00 2001 From: Diego Mello Date: Thu, 21 Jan 2021 14:20:28 -0300 Subject: [PATCH] [FIX] Server version becoming null on server change (#2821) --- app/views/RoomsListView/ServerDropdown.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/app/views/RoomsListView/ServerDropdown.js b/app/views/RoomsListView/ServerDropdown.js index 95d6603bd..5081f4504 100644 --- a/app/views/RoomsListView/ServerDropdown.js +++ b/app/views/RoomsListView/ServerDropdown.js @@ -143,7 +143,7 @@ class ServerDropdown extends Component { }, ANIMATION_DURATION); } - select = async(server) => { + select = async(server, version) => { const { server: currentServer, selectServerRequest, isMasterDetail } = this.props; @@ -163,7 +163,7 @@ class ServerDropdown extends Component { }, ANIMATION_DURATION); } else { await localAuthenticate(server); - selectServerRequest(server); + selectServerRequest(server, version); } } } @@ -204,7 +204,7 @@ class ServerDropdown extends Component { return ( this.select(item.id)} + onPress={() => this.select(item.id, item.version)} onLongPress={() => (item.id === server || this.remove(item.id))} hasCheck={item.id === server} theme={theme} @@ -283,7 +283,7 @@ const mapStateToProps = state => ({ const mapDispatchToProps = dispatch => ({ toggleServerDropdown: () => dispatch(toggleServerDropdownAction()), - selectServerRequest: server => dispatch(selectServerRequestAction(server, null, null, true)), + selectServerRequest: (server, version) => dispatch(selectServerRequestAction(server, version, true, true)), appStart: params => dispatch(appStartAction(params)), initAdd: previousServer => dispatch(serverInitAddAction(previousServer)) });