From ccb47e533dbe0f1e6c02e105e7ca401b132e481b Mon Sep 17 00:00:00 2001 From: Liam Fitzgerald Date: Mon, 18 Jan 2021 11:10:16 +1000 Subject: [PATCH] metadata-store: update import functionality --- pkg/arvo/app/lens.hoon | 1 - pkg/arvo/app/metadata-store.hoon | 18 +++++++++++++++++- 2 files changed, 17 insertions(+), 2 deletions(-) diff --git a/pkg/arvo/app/lens.hoon b/pkg/arvo/app/lens.hoon index 64fb2737c..2a790fc12 100644 --- a/pkg/arvo/app/lens.hoon +++ b/pkg/arvo/app/lens.hoon @@ -25,7 +25,6 @@ ^- (list @tas) :~ %group-store %metadata-store - %metadata-hook %contact-store %contact-hook %invite-store diff --git a/pkg/arvo/app/metadata-store.hoon b/pkg/arvo/app/metadata-store.hoon index a079c60e8..8cdd26b64 100644 --- a/pkg/arvo/app/metadata-store.hoon +++ b/pkg/arvo/app/metadata-store.hoon @@ -319,7 +319,23 @@ |= arc=* ^- (quip card _state) |^ - (on-load !>([%7 (remake-metadata ;;(tree-metadata +.arc))])) + =^ cards state + (on-load !>([%7 (remake-metadata ;;(tree-metadata +.arc))])) + :_ state + %+ weld cards + %+ turn ~(tap in ~(key by group-indices)) + |= rid=resource + %- poke-our + ?: =(entity.rid our.bowl) + :- %metadata-push-hook + push-hook-action+!>([%add rid]) + :- %metadata-pull-hook + pull-hook-action+!>([%add [entity .]:rid]) + :: + ++ poke-our + |= [app=term =cage] + ^- card + [%pass / %agent [our.bowl app] %poke cage] :: +$ tree-metadata $: associations=(tree [md-resource [resource metadata]])