mirror of
https://github.com/urbit/shrub.git
synced 2024-11-30 22:15:47 +03:00
launch: remove groups tile here rather than in contact-view
This commit is contained in:
parent
25e279ed82
commit
64a6e89be6
@ -8,8 +8,7 @@
|
|||||||
*metadata-store,
|
*metadata-store,
|
||||||
*metadata-hook,
|
*metadata-hook,
|
||||||
*permission-group-hook,
|
*permission-group-hook,
|
||||||
*permission-hook,
|
*permission-hook
|
||||||
launch
|
|
||||||
/+ *server, *contact-json, default-agent, dbug
|
/+ *server, *contact-json, default-agent, dbug
|
||||||
/= index
|
/= index
|
||||||
/^ octs
|
/^ octs
|
||||||
@ -45,12 +44,7 @@
|
|||||||
::
|
::
|
||||||
|%
|
|%
|
||||||
+$ card card:agent:gall
|
+$ card card:agent:gall
|
||||||
+$ state-zero [%0 ~]
|
|
||||||
+$ versioned-state
|
|
||||||
$% state-zero
|
|
||||||
==
|
|
||||||
--
|
--
|
||||||
=| state-zero
|
|
||||||
=* state -
|
=* state -
|
||||||
::
|
::
|
||||||
%- agent:dbug
|
%- agent:dbug
|
||||||
@ -73,19 +67,8 @@
|
|||||||
(group-poke:cc [%add [our.bowl ~ ~] /~/default])
|
(group-poke:cc [%add [our.bowl ~ ~] /~/default])
|
||||||
==
|
==
|
||||||
::
|
::
|
||||||
++ on-save !>(state)
|
++ on-save on-save:def
|
||||||
++ on-load
|
++ on-load on-load:def
|
||||||
|= old=vase
|
|
||||||
=/ pre-versioned=(each ~ tang)
|
|
||||||
(mule |.(!<(~ old)))
|
|
||||||
?: ?=(%.y -.pre-versioned)
|
|
||||||
:_ this(state [%0 ~])
|
|
||||||
[(launch-poke:cc [%remove %contact-view /primary])]~
|
|
||||||
=/ versioned=versioned-state
|
|
||||||
!<(versioned-state old)
|
|
||||||
?- -.versioned
|
|
||||||
%0 [~ this]
|
|
||||||
==
|
|
||||||
++ on-poke
|
++ on-poke
|
||||||
|= [=mark =vase]
|
|= [=mark =vase]
|
||||||
^- (quip card _this)
|
^- (quip card _this)
|
||||||
@ -234,11 +217,6 @@
|
|||||||
^- card
|
^- card
|
||||||
[%pass / %agent [ship %contact-hook] %poke %contact-action !>(act)]
|
[%pass / %agent [ship %contact-hook] %poke %contact-action !>(act)]
|
||||||
::
|
::
|
||||||
++ launch-poke
|
|
||||||
|= act=action:launch
|
|
||||||
^- card
|
|
||||||
[%pass / %agent [our.bol %launch] %poke %launch-action !>(act)]
|
|
||||||
::
|
|
||||||
++ group-poke
|
++ group-poke
|
||||||
|= act=group-action
|
|= act=group-action
|
||||||
^- card
|
^- card
|
||||||
|
@ -24,18 +24,17 @@
|
|||||||
::
|
::
|
||||||
|%
|
|%
|
||||||
+$ versioned-state
|
+$ versioned-state
|
||||||
$% state-zero
|
$% [%0 state-zero]
|
||||||
state-one
|
[%1 state-two]
|
||||||
|
[%2 state-two]
|
||||||
==
|
==
|
||||||
+$ state-zero
|
+$ state-zero
|
||||||
$: %0
|
$: tiles=(set tile:launch)
|
||||||
tiles=(set tile:launch)
|
|
||||||
data=tile-data:launch
|
data=tile-data:launch
|
||||||
path-to-tile=(map path @tas)
|
path-to-tile=(map path @tas)
|
||||||
==
|
==
|
||||||
+$ state-one
|
+$ state-two
|
||||||
$: %1
|
$: tiles=(set tile:launch)
|
||||||
tiles=(set tile:launch)
|
|
||||||
data=tile-data:launch
|
data=tile-data:launch
|
||||||
path-to-tile=(map path @tas)
|
path-to-tile=(map path @tas)
|
||||||
first-time=?
|
first-time=?
|
||||||
@ -44,7 +43,7 @@
|
|||||||
+$ card card:agent:gall
|
+$ card card:agent:gall
|
||||||
--
|
--
|
||||||
::
|
::
|
||||||
=| state-one
|
=| [%2 state-two]
|
||||||
=* state -
|
=* state -
|
||||||
%- agent:dbug
|
%- agent:dbug
|
||||||
^- agent:gall
|
^- agent:gall
|
||||||
@ -53,7 +52,7 @@
|
|||||||
def ~(. (default-agent this %|) bol)
|
def ~(. (default-agent this %|) bol)
|
||||||
++ on-init
|
++ on-init
|
||||||
^- (quip card _this)
|
^- (quip card _this)
|
||||||
:_ this(state *state-one)
|
:_ this(state *[%2 state-two])
|
||||||
[%pass / %arvo %e %connect [~ /] %launch]~
|
[%pass / %arvo %e %connect [~ /] %launch]~
|
||||||
::
|
::
|
||||||
++ on-save !>(state)
|
++ on-save !>(state)
|
||||||
@ -62,14 +61,21 @@
|
|||||||
|= old=vase
|
|= old=vase
|
||||||
^- (quip card _this)
|
^- (quip card _this)
|
||||||
=/ old-state !<(versioned-state old)
|
=/ old-state !<(versioned-state old)
|
||||||
:- ~
|
|-
|
||||||
?- -.old-state
|
?- -.old-state
|
||||||
%0
|
%0
|
||||||
%= this
|
$(old-state [%1 tiles.old-state data.old-state path-to-tile.old-state %.n])
|
||||||
state [%1 tiles.old-state data.old-state path-to-tile.old-state %.n]
|
|
||||||
==
|
|
||||||
::
|
::
|
||||||
%1 this(state old-state)
|
%1
|
||||||
|
=/ new-state=state-two
|
||||||
|
:* (~(del in tiles.old-state) [%contact-view /primary])
|
||||||
|
(~(del by data.old-state) %contact-view)
|
||||||
|
(~(del by path-to-tile.old-state) /primary)
|
||||||
|
first-time.old-state
|
||||||
|
==
|
||||||
|
$(old-state [%2 new-state])
|
||||||
|
::
|
||||||
|
%2 [~ this(state old-state)]
|
||||||
==
|
==
|
||||||
::
|
::
|
||||||
++ on-poke
|
++ on-poke
|
||||||
|
Loading…
Reference in New Issue
Block a user