From 36e90895f0482384f7b0de428a5c587a43ab84fa Mon Sep 17 00:00:00 2001 From: Joscha Date: Sun, 30 Sep 2018 21:39:50 +0000 Subject: [PATCH] Clean up --- src/TaskMachine/UI.hs | 5 ++--- src/TaskMachine/UI/Behaviors.hs | 2 +- 2 files changed, 3 insertions(+), 4 deletions(-) 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 =