From f1c3bbcb83d640051e2f06b147ea9c808128ef34 Mon Sep 17 00:00:00 2001 From: Logan Allen Date: Wed, 10 Feb 2021 13:16:32 -0600 Subject: [PATCH] setting-store: show tutorial upon first load, don't show if dismissed --- pkg/arvo/app/settings-store.hoon | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/pkg/arvo/app/settings-store.hoon b/pkg/arvo/app/settings-store.hoon index 7d64e39e5..10ece951b 100644 --- a/pkg/arvo/app/settings-store.hoon +++ b/pkg/arvo/app/settings-store.hoon @@ -22,7 +22,14 @@ do ~(. +> bol) def ~(. (default-agent this %|) bol) :: - ++ on-init on-init:def + ++ on-init + ^- (quip card _this) + :- ~ + %_ this + settings.state + %- ~(gas by *^settings) + [%tutorial (~(gas by *bucket) [%seen b+%|]~)]~ + == :: ++ on-save !>(state) :: @@ -31,10 +38,7 @@ ^- (quip card _this) =/ old !<(versioned-state old-vase) ?- -.old - %0 - :_ this(state old) - =- [%pass / %agent [our dap]:bol %poke -]~ - settings-event+!>([%put-entry %tutorial %seen b+%|]) + %0 [~ this(state old)] == :: ++ on-poke