[FIX] Server version becoming null on server change (#2821)
This commit is contained in:
parent
f0046f6676
commit
0fdb8f2e46
|
@ -143,7 +143,7 @@ class ServerDropdown extends Component {
|
||||||
}, ANIMATION_DURATION);
|
}, ANIMATION_DURATION);
|
||||||
}
|
}
|
||||||
|
|
||||||
select = async(server) => {
|
select = async(server, version) => {
|
||||||
const {
|
const {
|
||||||
server: currentServer, selectServerRequest, isMasterDetail
|
server: currentServer, selectServerRequest, isMasterDetail
|
||||||
} = this.props;
|
} = this.props;
|
||||||
|
@ -163,7 +163,7 @@ class ServerDropdown extends Component {
|
||||||
}, ANIMATION_DURATION);
|
}, ANIMATION_DURATION);
|
||||||
} else {
|
} else {
|
||||||
await localAuthenticate(server);
|
await localAuthenticate(server);
|
||||||
selectServerRequest(server);
|
selectServerRequest(server, version);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -204,7 +204,7 @@ class ServerDropdown extends Component {
|
||||||
return (
|
return (
|
||||||
<ServerItem
|
<ServerItem
|
||||||
item={item}
|
item={item}
|
||||||
onPress={() => this.select(item.id)}
|
onPress={() => this.select(item.id, item.version)}
|
||||||
onLongPress={() => (item.id === server || this.remove(item.id))}
|
onLongPress={() => (item.id === server || this.remove(item.id))}
|
||||||
hasCheck={item.id === server}
|
hasCheck={item.id === server}
|
||||||
theme={theme}
|
theme={theme}
|
||||||
|
@ -283,7 +283,7 @@ const mapStateToProps = state => ({
|
||||||
|
|
||||||
const mapDispatchToProps = dispatch => ({
|
const mapDispatchToProps = dispatch => ({
|
||||||
toggleServerDropdown: () => dispatch(toggleServerDropdownAction()),
|
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)),
|
appStart: params => dispatch(appStartAction(params)),
|
||||||
initAdd: previousServer => dispatch(serverInitAddAction(previousServer))
|
initAdd: previousServer => dispatch(serverInitAddAction(previousServer))
|
||||||
});
|
});
|
||||||
|
|
Loading…
Reference in New Issue