refactor state-handling in helper core
This commit is contained in:
parent
0c29772555
commit
2c99f59e97
@ -58,8 +58,10 @@
|
||||
`this
|
||||
%browsermanager-action
|
||||
=/ action !<(action:browsermanager vase)
|
||||
=/ new-state state(access-counts (add 1 access-counts.state))
|
||||
[(handle-action action) this(state new-state)]
|
||||
=/ output (handle-action action state)
|
||||
=/ new-actions=(list card) +2:output
|
||||
=/ new-state=state-0 +3:output
|
||||
[new-actions this(state new-state)]
|
||||
==
|
||||
++ on-save
|
||||
~& 'on-save'
|
||||
@ -73,9 +75,10 @@
|
||||
--
|
||||
:: Helper core
|
||||
++ handle-action
|
||||
|= action=action:browsermanager
|
||||
^- (list card)
|
||||
|= [action=action:browsermanager state=state-0]
|
||||
^- [(list card) state-0]
|
||||
~& 'Browser Manager action'
|
||||
~& >> action
|
||||
~
|
||||
=/ new-state state(access-counts (add 1 access-counts.state))
|
||||
[~ new-state]
|
||||
--
|
||||
|
Loading…
Reference in New Issue
Block a user