1
1
mirror of https://github.com/Yvee1/hascard.git synced 2024-11-25 09:54:43 +03:00

Do not require flipping of empty definition card

This commit is contained in:
Yvee1 2023-12-17 13:03:11 +01:00
parent 5e14b17ce8
commit d0f56b826e

View File

@ -261,10 +261,10 @@ handleEvent (VtyEvent e) =
s <- use cs s <- use cs
flip (`maybe` (`handlePopupEvent` ev)) pUp $ flip (`maybe` (`handlePopupEvent` ev)) pUp $
case (s ^. cardState, s ^. currentCard) of case (s ^. cardState, s ^. currentCard) of
(DefinitionState{_flipped = f}, _) -> (DefinitionState{_flipped = f}, Definition {definition = d}) ->
case ev of case ev of
V.EvKey V.KEnter [] -> V.EvKey V.KEnter [] ->
if f if f || all isSpace d
then if not (s^.reviewMode) then next then if not (s^.reviewMode) then next
else cs.popup ?= correctPopup else cs.popup ?= correctPopup
else cs.cardState.flipped %= not else cs.cardState.flipped %= not