forked from FOSS/BangleApps
Merge pull request #3228 from bobrippling/fix/sleeplog-logspam
sleeplog: only write log if we have something to writemaster
commit
4b38e2af42
|
@ -10,4 +10,5 @@
|
|||
0.12: Improve README, option to add functions triggered by status changes or time periods, remove old log (<0.10) conversion
|
||||
0.13: Prevent to stay in consecutive sleep if not worn, correct trigger calling, add trigger object itself as argument to the fn function
|
||||
0.14: Add "Delete all logfiles before" to interface.html, display all logfiles in the interface
|
||||
0.15: Issue newline before GB commands (solves issue with console.log and ignored commands)
|
||||
0.15: Issue newline before GB commands (solves issue with console.log and ignored commands)
|
||||
0.16: Only write logs if we have a non-empty log to write
|
||||
|
|
|
@ -169,7 +169,8 @@ exports = {
|
|||
// check if before this fortnight period
|
||||
if (firstDay < thisFirstDay) {
|
||||
// write log in seperate file
|
||||
require("Storage").writeJSON("sleeplog_" + this.msToFn(firstDay) + ".log", log);
|
||||
if(log.length > 0)
|
||||
require("Storage").writeJSON("sleeplog_" + this.msToFn(firstDay) + ".log", log);
|
||||
// set last day as first
|
||||
firstDay = lastDay;
|
||||
} else {
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
"id":"sleeplog",
|
||||
"name":"Sleep Log",
|
||||
"shortName": "SleepLog",
|
||||
"version": "0.15",
|
||||
"version": "0.16",
|
||||
"description": "Log and view your sleeping habits. This app is using the built in movement calculation.",
|
||||
"icon": "app.png",
|
||||
"type": "app",
|
||||
|
|
Loading…
Reference in New Issue