diff options
author | Raúl Benencia <rul@kalgan.cc> | 2013-08-28 11:28:38 -0300 |
---|---|---|
committer | Raúl Benencia <rul@kalgan.cc> | 2013-08-28 11:28:38 -0300 |
commit | 470b88d719fb6e740569c8e35affa0db6d3ed7fd (patch) | |
tree | e44d0cb2374e33625148b02c6b51e599a83a4832 /Handlers.hs | |
parent | 77112dd4cd7657ebf16734d117d42283ee34c742 (diff) |
Colorful header
Diffstat (limited to 'Handlers.hs')
-rw-r--r-- | Handlers.hs | 6 |
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 $ |