From 4010acf611b862be18e4a5fc8964f38c7767e5f2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ra=C3=BAl=20Benencia?= Date: Fri, 30 Aug 2013 09:49:01 -0300 Subject: Removed the workaround, as Rfc2822 is now fixed --- Handlers.hs | 14 ++++++++++++++ 1 file changed, 14 insertions(+) (limited to 'Handlers.hs') diff --git a/Handlers.hs b/Handlers.hs index 0fc1bd7..72f09dc 100644 --- a/Handlers.hs +++ b/Handlers.hs @@ -129,6 +129,17 @@ decSelectedRow MaildirMode = do else put $ decrementSelectedRow st +decSelectedRow EmailMode = do + st <- get + let est = emailState st + let cur = scrollRowEm est + let scrRows = screenRows st + let totalRows = length $ emailLines est + let est' = est { scrollRowEm = (cur - 1) } + + when ((totalRows - (scrRows + cur)) > 0) $ + put $ st { emailState = est' } + decSelectedRow _ = (=<<) put $ get >>= \st -> return $ decrementSelectedRow st {- Given a list, it returns the elements that will be in the next screen refresh @@ -158,3 +169,6 @@ formatMaildirModeRows st = mapM formatRow where pad = " " numPads = (length $ filter (== '/') str) + (length $ filter (`elem` imapSep) str) imapSep = ['.'] -- IMAP usually separates its directories with dots + +-- TODO: Improve this rancidness +mailHeaderLength = 4 \ No newline at end of file -- cgit v1.2.3