aboutsummaryrefslogtreecommitdiff
path: root/Screen.hs
diff options
context:
space:
mode:
authorRaúl Benencia <rul@kalgan.cc>2013-09-03 00:00:50 -0300
committerRaúl Benencia <rul@kalgan.cc>2013-09-03 00:00:50 -0300
commite41dd5091f597e2252deb9ecbde900eda7c15614 (patch)
treeb60a532b67aa9932dd0af9a00daf5735e496812b /Screen.hs
parent56b4aef769386e9fbe3b074698451e8b74489d61 (diff)
Sorted index mode
Diffstat (limited to 'Screen.hs')
-rw-r--r--Screen.hs12
1 files changed, 7 insertions, 5 deletions
diff --git a/Screen.hs b/Screen.hs
index 90954b1..5150e93 100644
--- a/Screen.hs
+++ b/Screen.hs
@@ -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
nihil fit ex nihilo