aboutsummaryrefslogtreecommitdiff
path: root/Handlers.hs
diff options
context:
space:
mode:
authorRaúl Benencia <rul@kalgan.cc>2013-08-28 11:28:38 -0300
committerRaúl Benencia <rul@kalgan.cc>2013-08-28 11:28:38 -0300
commit470b88d719fb6e740569c8e35affa0db6d3ed7fd (patch)
treee44d0cb2374e33625148b02c6b51e599a83a4832 /Handlers.hs
parent77112dd4cd7657ebf16734d117d42283ee34c742 (diff)
Colorful header
Diffstat (limited to 'Handlers.hs')
-rw-r--r--Handlers.hs6
1 files changed, 3 insertions, 3 deletions
diff --git a/Handlers.hs b/Handlers.hs
index 4605756..3d0b787 100644
--- a/Handlers.hs
+++ b/Handlers.hs
@@ -15,7 +15,7 @@ import Email(parseEmail, getFields, getSubject, getFrom)
import Maildir
import Print
import State
-import System.IO(IOMode(..), hGetContents, openFile)
+import qualified System.IO.UTF8 as UTF8
import Types (LazymailCurses)
previousMode :: Mode -> LazymailCurses ()
@@ -30,7 +30,7 @@ changeMode :: Mode -> LazymailCurses ()
changeMode EmailMode = return ()
changeMode IndexMode = do
st <- get
- msg <- liftIO $ readFile . selectedEmailPath . indexState $ st
+ msg <- liftIO $ UTF8.readFile . selectedEmailPath . indexState $ st
let ist = (indexState st) { selectedEmail = (parseEmail msg) }
put $ st { mode = EmailMode, indexState = ist }
@@ -123,7 +123,7 @@ scrollCrop top rows xs = take rows $ drop top xs
formatIndexModeRows st = mapM formatRow where
formatRow fp = do
- msg <- hGetContents =<< (openFile fp ReadMode)
+ msg <- UTF8.readFile fp
let email = parseEmail msg
let fs = getFields email
let str = normalizeLen (screenColumns st) . concat $
nihil fit ex nihilo