Close #130 - allow toggle low-priority habits
This commit is contained in:
@@ -223,8 +223,10 @@
|
|||||||
(_activeBonusEntries)
|
(_activeBonusEntries)
|
||||||
(_activeTodoEntries))))
|
(_activeTodoEntries))))
|
||||||
|
|
||||||
|
(prop &mut :Bool showLowerPriority false)
|
||||||
|
|
||||||
(method :Bool topPriorityIsActive []
|
(method :Bool topPriorityIsActive []
|
||||||
(apply or (for e (_allActiveEntries) e.topPriority)))
|
?(unless showLowerPriority (apply or (for e (_allActiveEntries) e.topPriority))))
|
||||||
|
|
||||||
(defMacro topPriority [name]
|
(defMacro topPriority [name]
|
||||||
`(method :Array<Entry> ,name []
|
`(method :Array<Entry> ,name []
|
||||||
|
@@ -342,6 +342,12 @@
|
|||||||
}
|
}
|
||||||
null null FlxColor.WHITE 0.9 0.9 true (defAndReturn prop xKey "escape") backToEntryWindow true)]
|
null null FlxColor.WHITE 0.9 0.9 true (defAndReturn prop xKey "escape") backToEntryWindow true)]
|
||||||
(set priorityWindow pw))))
|
(set priorityWindow pw))))
|
||||||
|
(let [showOrHide (if model.showLowerPriority "Hide" "Show")]
|
||||||
|
(_makeText "$showOrHide lower-priority habits and tasks" 0
|
||||||
|
->_
|
||||||
|
(defAndCall method toggleLowerPriority
|
||||||
|
(set model.showLowerPriority !model.showLowerPriority)
|
||||||
|
(refreshModel))))
|
||||||
(set entryWindow.textColor (FlxColor.RED.getDarkened))
|
(set entryWindow.textColor (FlxColor.RED.getDarkened))
|
||||||
(_makeText "Delete a habit or task" 0
|
(_makeText "Delete a habit or task" 0
|
||||||
->_
|
->_
|
||||||
|
Reference in New Issue
Block a user