Merge pull request #5070 from urbit/lf/fix-hiddens

metadata-store: do not hide groups on creation, unhide all current groups
This commit is contained in:
matildepark 2021-07-12 20:49:30 -04:00 committed by GitHub
commit 7dfa8d32a1
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 18 additions and 2 deletions

View File

@ -107,6 +107,7 @@
+$ state-9 [%9 base-state-3]
+$ state-10 [%10 base-state-3]
+$ state-11 [%11 base-state-3]
+$ state-12 [%12 base-state-3]
+$ versioned-state
$% state-0
state-1
@ -120,10 +121,11 @@
state-9
state-10
state-11
state-12
==
::
+$ inflated-state
$: state-11
$: state-12
cached-indices
==
--
@ -243,7 +245,7 @@
=| cards=(list card)
|^
=* loop $
?: ?=(%11 -.old)
?: ?=(%12 -.old)
:- cards
%_ state
associations associations.old
@ -251,6 +253,8 @@
group-indices (rebuild-group-indices associations.old)
app-indices (rebuild-app-indices associations.old)
==
?: ?=(%11 -.old)
$(-.old %12, associations.old (reset-group-hidden associations.old))
?: ?=(%10 -.old)
$(-.old %11, associations.old (hide-dm-assoc associations.old))
?: ?=(%9 -.old)
@ -293,6 +297,17 @@
:: pre-breach, can safely throw away
loop(old *state-8)
::
++ reset-group-hidden
|= assoc=associations:store
^- associations:store
%- ~(gas by *associations:store)
%+ turn ~(tap by assoc)
|= [m=md-resource:store [g=resource met=metadatum:store]]
^- [md-resource:store association:store]
=? hidden.met ?=(%groups app-name.m)
%.n
[m [g met]]
::
++ hide-dm-assoc
|= assoc=associations:store
^- associations:store

View File

@ -41,6 +41,7 @@
date-created now.bowl
creator our.bowl
config [%group ~]
hidden %.n
==
=/ met-action=action:metadata
[%add rid groups+rid metadatum]