From a4033264aa4ec0827305ba36593bd337a401a320 Mon Sep 17 00:00:00 2001 From: Pliable Pixels Date: Sat, 27 Aug 2016 17:56:26 -0400 Subject: #312 and #314 - address both I hope. Need to test on iOS Former-commit-id: cea654de48f8ffcca80a307a7b48f471df345ca7 --- www/js/DataModel.js | 18 ++++++++++++++++-- 1 file changed, 16 insertions(+), 2 deletions(-) (limited to 'www/js/DataModel.js') diff --git a/www/js/DataModel.js b/www/js/DataModel.js index 736312d1..328df81a 100644 --- a/www/js/DataModel.js +++ b/www/js/DataModel.js @@ -101,7 +101,9 @@ angular.module('zmApp.controllers') 'language': 'en', 'reachability': true, 'forceImageModePath': false, - 'disableNative': false + 'disableNative': false, + 'vibrateOnPush': true, + 'soundOnPush': true @@ -663,6 +665,18 @@ angular.module('zmApp.controllers') loginData.disableNative = false; } + + if (typeof loginData.vibrateOnPush == 'undefined') { + zmDebug("vibrate on push not found, setting to true"); + loginData.vibrateOnPush = true; + + } + + if (typeof loginData.soundOnPush == 'undefined') { + zmDebug("sound on push not found, setting to true"); + loginData.soundOnPush = true; + + } zmLog("DataModel init recovered this loginData as " + JSON.stringify(loginData)); @@ -883,7 +897,7 @@ angular.module('zmApp.controllers') }, function (error) { zmDebug("getAPIversion error handler " + JSON.stringify(error)); - d.resolve("0.0.0"); + d.reject("-1.-1.-1"); return (d.promise); }); return (d.promise); -- cgit v1.2.3