kh: don't show spinner name for user inputs

This commit is contained in:
fang 2021-04-14 20:35:17 +02:00
parent 98d48913bf
commit c55ebf36a4
No known key found for this signature in database
GPG Key ID: EB035760C1BBA972

View File

@ -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 =