- remove usage of historian & dependency
- update dependency to [re-frame "0.1.8"] - use new register-pure-handler in all steps NOTE: functional but daypart unit tests failing + history not yet working
This commit is contained in:
parent
dc74e017df
commit
76068c2cb9
|
@ -23,7 +23,7 @@
|
|||
(defn clear-history!
|
||||
[]
|
||||
(reset! undo-list [])
|
||||
(reset! undo-list []))
|
||||
(reset! redo-list []))
|
||||
|
||||
|
||||
(defn store-now!
|
||||
|
@ -34,22 +34,30 @@
|
|||
@max-undos
|
||||
(conj @undo-list @app-db)))))
|
||||
|
||||
(defn- undos?
|
||||
[v]
|
||||
(> (count v) 1))
|
||||
|
||||
(defn- redos?
|
||||
[v]
|
||||
(> (count v) 0))
|
||||
|
||||
|
||||
;; -- subscriptions -----------------------------------------------------------------------------
|
||||
|
||||
(subs/register
|
||||
:undos?
|
||||
(fn handler
|
||||
; "return true is anything is stored in the undo list, otherwise false"
|
||||
; "return true if anything is stored in the undo list, otherwise false"
|
||||
[_ _]
|
||||
(reaction (> (count @undo-list) 1))))
|
||||
(reaction (undos? @undo-list))))
|
||||
|
||||
(subs/register
|
||||
:redos?
|
||||
(fn handler
|
||||
; "return true is anything is stored in the redo list, otherwise false"
|
||||
; "return true if anything is stored in the redo list, otherwise false"
|
||||
[_ _]
|
||||
(reaction (> (count @redo-list) 0))))
|
||||
(reaction (redos? @redo-list))))
|
||||
|
||||
|
||||
;; -- event handlers ----------------------------------------------------------------------------
|
||||
|
|
Loading…
Reference in New Issue