diff options
author | Raúl Benencia <rul@kalgan.cc> | 2013-08-27 15:03:04 -0300 |
---|---|---|
committer | Raúl Benencia <rul@kalgan.cc> | 2013-08-27 15:03:04 -0300 |
commit | fab15274bae93611f85dd4cc221ce07b1661a081 (patch) | |
tree | 1023af4c4b664ade52466babadf3dc95864aab1e /Maildir.hs | |
parent | f21a1f23ab53ab628ed2677c8d85869fa7e22b45 (diff) |
Smoother scrolling in index mode
Diffstat (limited to 'Maildir.hs')
-rw-r--r-- | Maildir.hs | 8 |
1 files changed, 6 insertions, 2 deletions
@@ -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)] |