aboutsummaryrefslogtreecommitdiff
path: root/Screen.hs
diff options
context:
space:
mode:
Diffstat (limited to 'Screen.hs')
-rw-r--r--Screen.hs13
1 files changed, 5 insertions, 8 deletions
diff --git a/Screen.hs b/Screen.hs
index df426fd..b253452 100644
--- a/Screen.hs
+++ b/Screen.hs
@@ -60,16 +60,14 @@ startCurses = do
screenLoop :: LazymailCurses ()
screenLoop = do
w <- liftCurses $ defaultWindow
- st <- get
cfg <- ask
- (_, st') <- liftCurses $ updateWindow w $ runStateT (runReaderT performUpdate cfg) st
- put st'
+ get >>= \st ->
+ (liftCurses . (updateWindow w) $ runStateT (runReaderT performUpdate cfg) st) >>= put . snd
liftCurses $ render
handleEvent
- st <- get
- if (not . exitRequested) st
- then screenLoop
- else return ()
+ get >>= \st -> if (not . exitRequested) st
+ then screenLoop
+ else return ()
--performUpdate :: LazymailUpdate ()
performUpdate = do
@@ -121,7 +119,6 @@ clearMain rows columns = do
then drawEmptyLine $ currentRow + 1
else return ()
-
-- | Helper function of drawMode
drawIndexHelper [] = resetCurrentRow
drawIndexHelper ((fp, _, msg):ts) = do
nihil fit ex nihilo