hark-store: correctly send reads on %read-index

This commit is contained in:
Liam Fitzgerald 2020-12-11 14:21:06 +10:00
parent dce48e5dec
commit 191b623d47
No known key found for this signature in database
GPG Key ID: D390E12C61D1CFFB

View File

@ -391,23 +391,27 @@
::
++ read-boxes
|= [boxes=(set @da) =index:store]
^+ state
^- (quip card _state)
=/ boxes=(list @da)
~(tap in boxes)
=| crds=(list card)
|-
?~ boxes state
?~ boxes [crds state]
=* box i.boxes
=^ cards state
(read-note box index)
$(boxes t.boxes)
$(boxes t.boxes, crds (welp crds cards))
::
++ read-index
|= =index:store
^- (quip card _state)
=/ boxes=(set @da)
(~(get ju by-index) index)
:- (give:ha ~[/updates] %read-index index)
(read-boxes boxes index)
=^ cards state
(read-boxes boxes index)
:_ state
%+ welp cards
(give:ha ~[/updates] %read-index index)
::
++ read-all
^- (quip card _state)