summaryrefslogtreecommitdiffhomepage
path: root/app/containers
diff options
context:
space:
mode:
authorAndrej Mihajlov <and@codeispoetry.ru>2017-03-15 14:36:57 +0000
committerAndrej Mihajlov <and@codeispoetry.ru>2017-03-15 14:36:57 +0000
commit4f79052bdb022eaa4eb26da0379127fb49f9c3db (patch)
treeccaa16e863278eabd930dd9c4037373699f6a961 /app/containers
parentff2eb29ae38fdc1f64e107bbf64a95ca3d9dc4df (diff)
downloadmullvadvpn-4f79052bdb022eaa4eb26da0379127fb49f9c3db.tar.xz
mullvadvpn-4f79052bdb022eaa4eb26da0379127fb49f9c3db.zip
Add delay before reconnecting to ensure that map is fully loaded before transition to next location
Diffstat (limited to 'app/containers')
-rw-r--r--app/containers/SelectLocationPage.js9
1 files changed, 7 insertions, 2 deletions
diff --git a/app/containers/SelectLocationPage.js b/app/containers/SelectLocationPage.js
index a817d0d9cb..3d89f69ba8 100644
--- a/app/containers/SelectLocationPage.js
+++ b/app/containers/SelectLocationPage.js
@@ -11,9 +11,14 @@ const mapDispatchToProps = (dispatch, props) => {
onClose: () => props.router.push('/connect'),
onSelect: (preferredServer) => {
const server = backend.serverInfo(preferredServer);
- settings.updateSettings({ preferredServer });
- backend.connect(server.address);
+
props.router.push('/connect');
+
+ // add delay to let the map load
+ setTimeout(() => {
+ settings.updateSettings({ preferredServer });
+ backend.connect(server.address);
+ }, 600);
}
};
};