1
1
mirror of https://github.com/Yvee1/hascard.git synced 2024-11-25 01:42:20 +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
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