fix habit game type errors
This commit is contained in:
@@ -107,8 +107,11 @@
|
|||||||
points (count (l.split "") ->c (= c "|")))))))
|
points (count (l.split "") ->c (= c "|")))))))
|
||||||
(otherwise (break))))))
|
(otherwise (break))))))
|
||||||
|
|
||||||
|
(method :Array<Entry> allEntries []
|
||||||
|
(cast (concat dailyEntries monthlyEntries intervalEntries bonusEntries todoEntries)))
|
||||||
|
|
||||||
(method :Int totalPoints []
|
(method :Int totalPoints []
|
||||||
(apply + (for l (flatten (for e (the Array<Entry> (concat dailyEntries monthlyEntries intervalEntries bonusEntries todoEntries)) e.labels)) l.points)))
|
(apply + (for l (flatten (for e (allEntries) e.labels)) l.points)))
|
||||||
|
|
||||||
(function :String stringify [:Entry e]
|
(function :String stringify [:Entry e]
|
||||||
"$(case e.type
|
"$(case e.type
|
||||||
@@ -174,7 +177,7 @@
|
|||||||
dayToEndSearch
|
dayToEndSearch
|
||||||
(if lastDayDone
|
(if lastDayDone
|
||||||
(DateTime.fromString lastDayDone)
|
(DateTime.fromString lastDayDone)
|
||||||
(let [now (DateTime.fromDate (Date.now))]
|
(let [&mut now (DateTime.fromDate (Date.now))]
|
||||||
(until (= 1 (now.getDay)) #|now -= oneDayInterval;|#)
|
(until (= 1 (now.getDay)) #|now -= oneDayInterval;|#)
|
||||||
now))]
|
now))]
|
||||||
(until (and (= (nextDay.getDay) (dayToEndSearch.getDay)) (= (nextDay.getMonth) (dayToEndSearch.getMonth)) (= (nextDay.getYear) (dayToEndSearch.getYear)))
|
(until (and (= (nextDay.getDay) (dayToEndSearch.getDay)) (= (nextDay.getMonth) (dayToEndSearch.getMonth)) (= (nextDay.getYear) (dayToEndSearch.getYear)))
|
||||||
|
@@ -79,7 +79,7 @@
|
|||||||
(map (m.activeTodoEntries) makeText)
|
(map (m.activeTodoEntries) makeText)
|
||||||
(add entryTexts)
|
(add entryTexts)
|
||||||
|
|
||||||
(doFor e (the Array<Entry> (concat m.dailyEntries m.monthlyEntries m.intervalEntries m.bonusEntries m.todoEntries))
|
(doFor e (m.allEntries)
|
||||||
(when (HabitModel.isActive e)
|
(when (HabitModel.isActive e)
|
||||||
(let [label (HabitModel.activeLabel e)]
|
(let [label (HabitModel.activeLabel e)]
|
||||||
(shortcutHandler.registerItem label.label e))))
|
(shortcutHandler.registerItem label.label e))))
|
||||||
|
Reference in New Issue
Block a user