diff options
author | Struan Donald <struan@exo.org.uk> | 2014-04-02 17:07:26 +0100 |
---|---|---|
committer | Struan Donald <struan@exo.org.uk> | 2014-04-02 17:07:26 +0100 |
commit | 9f0f4410e4cb092e59f5967440dec8d1a70c5854 (patch) | |
tree | 5a1328d3b5a2b4b363d8cf3a5bef29ba6fccf792 | |
parent | 1218cda7e6ef2978a3459de8b34c7f29ad97a0a7 (diff) |
if it's a bad connection then go straight offline
With a very low grade cell connection we should just go straight offline
as it's just unlikely to work
-rw-r--r-- | src/js/views/home.js | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/js/views/home.js b/src/js/views/home.js index 998af1c..884d87e 100644 --- a/src/js/views/home.js +++ b/src/js/views/home.js @@ -26,6 +26,8 @@ $('#load-screen').hide(); if ( FMS.isOffline ) { this.navigate( 'offline' ); + } else if ( navigator && navigator.connection && navigator.connection.type == Connection.CELL ) { + this.navigate( 'offline' ); } else if ( FMS.currentDraft && ( FMS.currentDraft.get('title') || FMS.currentDraft.get('lat') || FMS.currentDraft.get('details') || FMS.currentDraft.get('file') ) |