clock: ensure launch is listening correctly

In the wild, ships that were live pre-OS1 still had launch subscriptions
open to the clock on the /tile path, instead of the currently-used
/clocktile path. Additionally, launch state for the clock tile seemed
incomplete.

Here, we simply re-%add the clock to launch.

Note that launch currently does not clean up old subscriptions on
path change. For the pre-OS1 case, the old path is no longer in use,
rendering the subscription harmless. For cases where the correct
subscription was already in place, it'll print a %watch-wire-not-unique,
but doesn't do any harm besides that.
This commit is contained in:
Fang 2020-04-01 23:13:57 +02:00
parent b62105cce4
commit 809befb6fc
No known key found for this signature in database
GPG Key ID: EB035760C1BBA972

View File

@ -35,13 +35,21 @@
==
:: bootstrapping to get %goad started OTA
::
++ on-save !>(%2)
++ on-save !>(%3)
++ on-load
|= old-state=vase
=/ old !<(?(~ %1 %2) old-state)
^- (quip card _this)
=/ old !<(?(~ %1 %2 %3) old-state)
=^ cards this
?: ?=(%2 old)
?: ?=(%3 old)
`this
?: ?=(%2 old)
:: ensure launch is set up to listen to us correctly
::
=/ launcha
[%launch-action !>([%add %clock /clocktile '/~clock/js/tile.js'])]
:_ this
[%pass /clock %agent [our.bowl %launch] %poke launcha]~
:_ this :_ ~
[%pass /behn %arvo %b %wait +(now.bowl)]
::