HabitModel.totalPoints()
This commit is contained in:
@@ -67,6 +67,9 @@
|
||||
points (count (l.split "") ->c (= c "|")))))))
|
||||
(otherwise (break))))))
|
||||
|
||||
(method :Int totalPoints []
|
||||
(apply + (for l (flatten (for e (the Array<Entry> (concat dailyEntries bonusEntries todoEntries)) e.labels)) l.points)))
|
||||
|
||||
(function :String stringify [:Entry e]
|
||||
"$(ifLet [(when !(= days.length 7) (Daily days)) e.type]
|
||||
(+ (.join (for day days
|
||||
|
@@ -11,6 +11,7 @@
|
||||
(prop &mut :HabitModel model null)
|
||||
(method setModel [m]
|
||||
(set model m)
|
||||
~(m.totalPoints)
|
||||
(set shortcutHandler (new KeyShortcutHandler))
|
||||
|
||||
(when entryTexts (remove entryTexts))
|
||||
|
Reference in New Issue
Block a user