summaryrefslogtreecommitdiff
path: root/www/js/app.js
diff options
context:
space:
mode:
Diffstat (limited to 'www/js/app.js')
-rw-r--r--www/js/app.js22
1 files changed, 19 insertions, 3 deletions
diff --git a/www/js/app.js b/www/js/app.js
index 81e26253..34958cbc 100644
--- a/www/js/app.js
+++ b/www/js/app.js
@@ -1,6 +1,6 @@
/* jshint -W041, -W093 */
/* jslint browser: true*/
-/* global cordova,StatusBar,angular,console,alert,PushNotification, moment ,ionic, URI,Packery, ConnectSDK, CryptoJS, ContactFindOptions, localforage,$, Connection, MobileAccessibility */
+/* global cordova,StatusBar,angular,console,alert,PushNotification, moment ,ionic, URI,Packery, ConnectSDK, CryptoJS, ContactFindOptions, localforage,$, Connection, MobileAccessibility, hello */
// For desktop versions, this is replaced
// with actual app version from config.xml by the
@@ -94,7 +94,10 @@ angular.module('zmApp', [
monSingleImageQualityLowBW: 70,
montageQualityLowBW: 50,
eventMontageQualityLowBW: 50,
- maxGifCount:70,
+ maxGifCount:60,
+ maxGifCount2:100,
+ maxGifWidth:800.0,
+ quantSample:15,
})
@@ -543,6 +546,8 @@ angular.module('zmApp', [
'request': function(config)
{
+ if (!config) return config;
+ if (!config.url) return config;
// NOTE ON TIMEOUTS: As of Oct 10 2016, it seems
// the Http queue often gets messed up when there is a timeout
@@ -851,8 +856,11 @@ angular.module('zmApp', [
function doLogin(str)
{
+
var d = $q.defer();
+
+
NVRDataModel.processFastLogin()
// coming here means login not needed, old login is valid
.then(function(success)
@@ -876,6 +884,13 @@ angular.module('zmApp', [
}
+ if ($rootScope.isDownloading)
+ {
+ NVRDataModel.log("Skipping login process as we are downloading...");
+ d.resolve("success");
+ return d.promise;
+ }
+
NVRDataModel.debug("Resetting zmCookie...");
$rootScope.zmCookie = '';
// first try to login, if it works, good
@@ -1341,7 +1356,7 @@ angular.module('zmApp', [
$ionicPlatform.ready(function()
{
-
+
$rootScope.textScaleFactor = 1.0;
$rootScope.db = null;
@@ -1669,6 +1684,7 @@ angular.module('zmApp', [
document.addEventListener("resume", function()
{
NVRDataModel.log("App is resuming from background");
+ $rootScope.isDownloading = false;
var forceDelay = NVRDataModel.getLogin().resumeDelay;
NVRDataModel.log(">>> Resume delayed for " + forceDelay + " ms, to wait for network stack...");