mirror of
https://github.com/urbit/shrub.git
synced 2024-12-21 01:41:37 +03:00
kh: don't show spinner name for user inputs
This commit is contained in:
parent
98d48913bf
commit
c55ebf36a4
@ -380,11 +380,9 @@ instance FromNoun Ev where
|
|||||||
-- Short Event Names -----------------------------------------------------------
|
-- Short Event Names -----------------------------------------------------------
|
||||||
|
|
||||||
{-
|
{-
|
||||||
In the case of the user hitting enter, the cause is technically a
|
In the case of user input, the cause is technically a terminal event,
|
||||||
terminal event, but we don't display any name because the cause is
|
but we don't display any name because the cause is really the user.
|
||||||
really the user.
|
|
||||||
-}
|
-}
|
||||||
--REVIEW doesn't that hold for _any_ terminal event?
|
|
||||||
getSpinnerNameForEvent :: Ev -> Maybe Text
|
getSpinnerNameForEvent :: Ev -> Maybe Text
|
||||||
getSpinnerNameForEvent = \case
|
getSpinnerNameForEvent = \case
|
||||||
EvBlip b -> case b of
|
EvBlip b -> case b of
|
||||||
@ -396,11 +394,11 @@ getSpinnerNameForEvent = \case
|
|||||||
BlipEvHttpServer _ -> Just "eyre"
|
BlipEvHttpServer _ -> Just "eyre"
|
||||||
BlipEvNewt _ -> Just "newt"
|
BlipEvNewt _ -> Just "newt"
|
||||||
BlipEvSync _ -> Just "clay"
|
BlipEvSync _ -> Just "clay"
|
||||||
BlipEvTerm t | isRet t -> Nothing
|
BlipEvTerm t | isUser t -> Nothing
|
||||||
BlipEvTerm t -> Just "term"
|
BlipEvTerm t -> Just "term"
|
||||||
where
|
where
|
||||||
isRet (TermEvBelt _ (Bol (Ret ()))) = True
|
isUser (TermEvBelt _ _) = True
|
||||||
isRet _ = False
|
isUser _ = False
|
||||||
|
|
||||||
summarizeEvent :: Ev -> Text
|
summarizeEvent :: Ev -> Text
|
||||||
summarizeEvent ev =
|
summarizeEvent ev =
|
||||||
|
Loading…
Reference in New Issue
Block a user