From d0f56b826e2e131a425811cd9587a5a5d55e45c9 Mon Sep 17 00:00:00 2001 From: Yvee1 Date: Sun, 17 Dec 2023 13:03:11 +0100 Subject: [PATCH] Do not require flipping of empty definition card --- src/UI/Cards.hs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/UI/Cards.hs b/src/UI/Cards.hs index ae10a56..a5b55b3 100644 --- a/src/UI/Cards.hs +++ b/src/UI/Cards.hs @@ -261,10 +261,10 @@ handleEvent (VtyEvent e) = s <- use cs flip (`maybe` (`handlePopupEvent` ev)) pUp $ case (s ^. cardState, s ^. currentCard) of - (DefinitionState{_flipped = f}, _) -> + (DefinitionState{_flipped = f}, Definition {definition = d}) -> case ev of V.EvKey V.KEnter [] -> - if f + if f || all isSpace d then if not (s^.reviewMode) then next else cs.popup ?= correctPopup else cs.cardState.flipped %= not