more stylistic changes

This commit is contained in:
Jonathan Lamothe 2023-06-01 19:06:46 -04:00
parent 17b3f9a03e
commit 251dc90cea
2 changed files with 8 additions and 8 deletions

View File

@ -27,8 +27,8 @@ import Brick.Types (Widget)
import Brick.Widgets.Core (str, vBox) import Brick.Widgets.Core (str, vBox)
import Control.Monad.State.Class (modify) import Control.Monad.State.Class (modify)
import Data.Maybe (fromMaybe) import Data.Maybe (fromMaybe)
import Lens.Micro ((^.), (.~), (%~)) import Lens.Micro ((^.))
import Lens.Micro.Mtl (use) import Lens.Micro.Mtl ((.=), (%=), use)
import Mtlstats.Actions import Mtlstats.Actions
import Mtlstats.Handlers import Mtlstats.Handlers
@ -101,9 +101,9 @@ deleteC _ = Controller
, handleController = \e -> case ynHandler e of , handleController = \e -> case ynHandler e of
Just True -> do Just True -> do
use (progMode.editGoalieStateL.egsSelectedGoalie) >>= mapM_ use (progMode.editGoalieStateL.egsSelectedGoalie) >>= mapM_
(\gid -> modify $ database.dbGoalies %~ dropNth gid) (\gid -> database.dbGoalies %= dropNth gid)
modify edit modify edit
Just False -> modify $ progMode.editGoalieStateL.egsMode .~ EGMenu Just False -> progMode.editGoalieStateL.egsMode .= EGMenu
Nothing -> return () Nothing -> return ()
} }

View File

@ -25,8 +25,8 @@ import Brick.Types (Widget)
import Brick.Widgets.Core (emptyWidget, str, vBox) import Brick.Widgets.Core (emptyWidget, str, vBox)
import Control.Monad.State.Class (modify) import Control.Monad.State.Class (modify)
import Data.Maybe (fromMaybe) import Data.Maybe (fromMaybe)
import Lens.Micro ((^.), (.~), (%~)) import Lens.Micro ((^.))
import Lens.Micro.Mtl (use) import Lens.Micro.Mtl ((.=), (%=), use)
import Mtlstats.Actions import Mtlstats.Actions
import Mtlstats.Handlers import Mtlstats.Handlers
@ -92,9 +92,9 @@ deleteC _ = Controller
, handleController = \e -> case ynHandler e of , handleController = \e -> case ynHandler e of
Just True -> do Just True -> do
use (progMode.editPlayerStateL.epsSelectedPlayer) >>= mapM_ use (progMode.editPlayerStateL.epsSelectedPlayer) >>= mapM_
(\pid -> modify $ database.dbPlayers %~ dropNth pid) (\pid -> database.dbPlayers %= dropNth pid)
modify edit modify edit
Just False -> modify $ progMode.editPlayerStateL.epsMode .~ EPMenu Just False -> progMode.editPlayerStateL.epsMode .= EPMenu
Nothing -> return () Nothing -> return ()
} }