diff --git a/src/TaskMachine/UI.hs b/src/TaskMachine/UI.hs index 3a935d9..26dcd52 100644 --- a/src/TaskMachine/UI.hs +++ b/src/TaskMachine/UI.hs @@ -35,9 +35,8 @@ closeBehavior f s e = f s e -- wrapper around anoth popupBehavior :: Popup RName (UIState -> NewState) -> UIState -> VTY.Event -> NewState popupBehavior p s (VTY.EvKey VTY.KEnter []) = case popupSelection p of - Nothing -> B.continue s{errorPopup=Nothing} - Just action -> do - action s{errorPopup=Nothing} + Nothing -> B.continue s{errorPopup=Nothing} + Just action -> action s{errorPopup=Nothing} popupBehavior p s e = do newPopup <- handlePopupEvent e p B.continue s{errorPopup=Just newPopup} diff --git a/src/TaskMachine/UI/Behaviors.hs b/src/TaskMachine/UI/Behaviors.hs index ccc56bb..73bbf53 100644 --- a/src/TaskMachine/UI/Behaviors.hs +++ b/src/TaskMachine/UI/Behaviors.hs @@ -11,9 +11,9 @@ import qualified Graphics.Vty as VTY import Text.Megaparsec import TaskMachine.Task +import TaskMachine.UI.Stuff import TaskMachine.UI.TaskList import TaskMachine.UI.Types -import TaskMachine.UI.Stuff startEdit :: UIState -> UIState startEdit s =