From e3a455fc3791539275fdb6aff003ffa8460f8850 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ra=C3=BAl=20Benencia?= Date: Thu, 5 Sep 2013 20:34:56 -0300 Subject: rename scrolling functions --- src/Lazymail/State.hs | 45 --------------------------------------------- 1 file changed, 45 deletions(-) (limited to 'src/Lazymail/State.hs') diff --git a/src/Lazymail/State.hs b/src/Lazymail/State.hs index 06353da..1323118 100644 --- a/src/Lazymail/State.hs +++ b/src/Lazymail/State.hs @@ -75,51 +75,6 @@ scrRowsAsInteger st = toInteger $ screenRows st curRowAsInteger st = toInteger $ currentRow st colPadAsInteger st = toInteger $ columnPadding st - -incrementSelectedRow st | (selectedRow st) < limit = - case (mode st) of - MaildirMode -> - let - sr = (selectedRowMD . maildirState) st - maildirState' = (maildirState st) { selectedRowMD = sr + 1 } - in - st { maildirState = maildirState' } - IndexMode -> - let - sr = (selectedRowIn . indexState) st - indexState' = (indexState st) { selectedRowIn = sr + 1 } - in - st { indexState = indexState' } - _ -> st - | otherwise = st - where - scrRows = screenRows st - curInLen = length $ selectedEmails . indexState $ st - curMDLen = length $ detectedMDs . maildirState $ st - limit' = case (mode st) of - MaildirMode -> if curMDLen < scrRows then curMDLen - 1 else scrRows - IndexMode -> if curInLen < scrRows then curInLen - 1 else scrRows - limit = if (statusBar st) && (limit' == scrRows) - then fromIntegral $ limit' - 2 - else fromIntegral limit' - -decrementSelectedRow st | (selectedRow st) > 0 = - case (mode st) of - MaildirMode -> - let - sr = (selectedRowMD . maildirState) st - maildirState' = (maildirState st) { selectedRowMD = sr - 1 } - in - st { maildirState = maildirState' } - IndexMode -> - let - sr = (selectedRowIn . indexState) st - indexState' = (indexState st) { selectedRowIn = sr - 1 } - in - st { indexState = indexState' } - _ -> st - | otherwise = st - selectedRow st = case (mode st) of MaildirMode -> selectedRowMD . maildirState $ st IndexMode -> selectedRowIn . indexState $ st -- cgit v1.2.3