@felicienfrancois/cordova-plugin-stepper
Advanced tools
Comparing version 0.2.51 to 0.2.52
{ | ||
"name": "@felicienfrancois/cordova-plugin-stepper", | ||
"version": "0.2.51", | ||
"version": "0.2.52", | ||
"description": "Lightweight pedometer Cordova/Phonegap plugin for Android using the hardware step sensor, with notifications.", | ||
@@ -5,0 +5,0 @@ "cordova": { |
@@ -49,3 +49,12 @@ var exec = require("cordova/exec"); | ||
} | ||
exec(onSuccess, onError, "Stepper", "startStepperUpdates", [opts]); | ||
exec((result) => { | ||
if (result && result.startDate && result.startDate < new Date().setHours(0,0,0,0)) { | ||
this.stopStepperUpdates( | ||
false, | ||
this.startStepperUpdates.bind(this, options, onSuccess, onError, extra), | ||
this.startStepperUpdates.bind(this, options, onSuccess, onError, extra) | ||
); | ||
} | ||
return onSuccess(result); | ||
}, onError, "Stepper", "startStepperUpdates", [opts]); | ||
}; | ||
@@ -52,0 +61,0 @@ |
Sorry, the diff of this file is not supported yet
79183
1462