Update more frequently

This commit is contained in:
2021-01-12 09:53:58 -06:00
parent 40d953f216
commit 1789fe7c23

View File

@ -4,18 +4,15 @@ Module.register("MMM-todo", {
},
start: function() {
var self = this
setTimeout(function() {
self.dailyUpdate()
}, self.getTimeToMidnight() - new Date())
this.doUpdate()
},
dailyUpdate: function() {
doUpdate: function() {
var self = this
self.updateDom()
setTimeout(function() {
self.dailyUpdate()
}, self.getTimeToMidnight())
self.doUpdate()
}, 5 * 60 * 1000)
},
getDom: function() {
@ -52,12 +49,6 @@ Module.register("MMM-todo", {
return ty + tm + td
},
getTimeToMidnight() {
var timeToMidnight = new Date()
timeToMidnight.setHours(24, 0, 0, 0)
return timeToMidnight
},
getCheckbox: function(label, id) {
var container = document.createElement("label")
container.className = "todo-container"
@ -87,4 +78,4 @@ Module.register("MMM-todo", {
getStyles: function() {
return [this.file("MMM-todo.css")]
}
})
})