From fab15274bae93611f85dd4cc221ce07b1661a081 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ra=C3=BAl=20Benencia?= Date: Tue, 27 Aug 2013 15:03:04 -0300 Subject: Smoother scrolling in index mode --- Maildir.hs | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'Maildir.hs') diff --git a/Maildir.hs b/Maildir.hs index f76695a..ede0f44 100644 --- a/Maildir.hs +++ b/Maildir.hs @@ -29,8 +29,12 @@ getMaildirEmails md = do n <- (getNewEmails md) return $ r ++ n -getReadEmails md = getDirectoryContents $ md "cur" -getNewEmails md = getDirectoryContents $ md "new" +getReadEmails md = getEmails $ md "cur" +getNewEmails md = getEmails $ md "new" + +getEmails fp = do + contents <- getDirectoryContents fp + return $ map (fp ) $ filter (`notElem` [".", ".."]) contents {- | Returns information about specific messages. -} getMessages :: Maildir -> [FilePath] -> IO [(FilePath, Flags, String)] -- cgit v1.2.3