diff --git a/src/Mtlstats/Control/EditGoalie.hs b/src/Mtlstats/Control/EditGoalie.hs index 3bca300..7632084 100644 --- a/src/Mtlstats/Control/EditGoalie.hs +++ b/src/Mtlstats/Control/EditGoalie.hs @@ -25,7 +25,7 @@ module Mtlstats.Control.EditGoalie (editGoalieC) where import Control.Monad.Trans.State (gets, modify) import Data.Maybe (fromMaybe) -import Lens.Micro ((^.), (%~)) +import Lens.Micro ((^.), (.~), (%~)) import UI.NCurses as C import Mtlstats.Actions @@ -110,9 +110,9 @@ deleteC _ = Controller Just True -> do gets (^.progMode.editGoalieStateL.egsSelectedGoalie) >>= mapM_ (\gid -> modify $ database.dbGoalies %~ dropNth gid) - modify editGoalie + modify edit - Just False -> modify editGoalie + Just False -> modify $ progMode.editGoalieStateL.egsMode .~ EGMenu Nothing -> return () return True diff --git a/src/Mtlstats/Control/EditPlayer.hs b/src/Mtlstats/Control/EditPlayer.hs index 90e5b7c..5fe1d96 100644 --- a/src/Mtlstats/Control/EditPlayer.hs +++ b/src/Mtlstats/Control/EditPlayer.hs @@ -23,7 +23,7 @@ module Mtlstats.Control.EditPlayer (editPlayerC) where import Control.Monad.Trans.State (gets, modify) import Data.Maybe (fromMaybe) -import Lens.Micro ((^.), (%~)) +import Lens.Micro ((^.), (.~), (%~)) import qualified UI.NCurses as C import Mtlstats.Actions @@ -101,9 +101,9 @@ deleteC _ = Controller Just True -> do gets (^.progMode.editPlayerStateL.epsSelectedPlayer) >>= mapM_ (\pid -> modify $ database.dbPlayers %~ dropNth pid) - modify editPlayer + modify edit - Just False -> modify editPlayer + Just False -> modify $ progMode.editPlayerStateL.epsMode .~ EPMenu Nothing -> return () return True