1
0
Fork 0
BangleApps/apps/activityreminder/lib.js

22 lines
648 B
JavaScript
Raw Normal View History

2022-04-18 13:07:38 +00:00
exports.loadSettings = function() {
2022-04-18 13:05:41 +00:00
return Object.assign({
enabled: true,
startHour: 9,
endHour: 20,
maxInnactivityMin: 30,
dismissDelayMin: 15,
minSteps: 50
}, require("Storage").readJSON("activityreminder.s.json", true) || {});
2022-04-18 15:02:20 +00:00
};
2022-04-18 13:05:41 +00:00
2022-04-18 14:44:53 +00:00
exports.writeSettings = function(settings){
require("Storage").writeJSON("activityreminder.s.json", settings);
2022-04-18 15:02:20 +00:00
};
2022-04-18 14:41:57 +00:00
2022-04-18 13:05:41 +00:00
exports.saveStepsArray = function(stepsArray) {
require("Storage").writeJSON("activityreminder.sa.json", stepsArray);
2022-04-18 15:02:20 +00:00
};
2022-04-18 13:05:41 +00:00
exports.loadStepsArray = function(){
return require("Storage").readJSON("activityreminder.sa.json") || [];
2022-04-18 15:02:20 +00:00
};