diff options
author | Raúl Benencia <rul@kalgan.cc> | 2013-09-03 00:00:50 -0300 |
---|---|---|
committer | Raúl Benencia <rul@kalgan.cc> | 2013-09-03 00:00:50 -0300 |
commit | e41dd5091f597e2252deb9ecbde900eda7c15614 (patch) | |
tree | b60a532b67aa9932dd0af9a00daf5735e496812b /Screen.hs | |
parent | 56b4aef769386e9fbe3b074698451e8b74489d61 (diff) |
Sorted index mode
Diffstat (limited to 'Screen.hs')
-rw-r--r-- | Screen.hs | 12 |
1 files changed, 7 insertions, 5 deletions
@@ -26,7 +26,7 @@ import Email(lookupField, getBody, getHeaders) import Print import Rfc1342 import State -import Types(LazymailCurses, LazymailUpdate) +import Types {- This function is the nexus between Curses and IO -} entryPoint :: Lazymail () @@ -153,13 +153,15 @@ drawEmailHeader = do let row = curRowAsInteger st setColor $ headerColorID . colorStyle $ st moveCursor row (colPadAsInteger st) - drawCroppedString st $ ("From: " ++) . ppField $ lookupField "from" hs + drawCroppedString st $ ("Date: " ++) . ppField $ lookupField "date" hs moveCursor (row + 1) (colPadAsInteger st) - drawCroppedString st $ ("To: " ++) . ppField $ lookupField "to" hs + drawCroppedString st $ ("From: " ++) . ppField $ lookupField "from" hs moveCursor (row + 2) (colPadAsInteger st) + drawCroppedString st $ ("To: " ++) . ppField $ lookupField "to" hs + moveCursor (row + 3) (colPadAsInteger st) drawCroppedString st $ ("Subject: " ++) . ppField $ lookupField "subject" hs setColor $ baseColorID . colorStyle $ st - put $ st { currentRow = (4 + currentRow st) } + put $ st { currentRow = (5 + currentRow st) } {- Draw the email body -} drawBody _ _ _ [] = return () @@ -233,7 +235,7 @@ resetScrollBuffer = do put st { maildirState = mst} IndexMode -> do let ist = (indexState st) { - scrollBufferIn = EH.scrollCrop 0 (screenRows st) $ selectedEmails . indexState $ st } + scrollBufferIn = EH.formatIndexModeRows st $ EH.scrollCrop 0 (screenRows st) $ selectedEmails . indexState $ st } put st { indexState = ist } drawCroppedString st str = drawString $ normalizeLen (screenColumns st) str |