aboutsummaryrefslogtreecommitdiffhomepage
path: root/Types
diff options
context:
space:
mode:
authorSean Whitton <spwhitton@spwhitton.name>2017-03-01 06:37:57 -0700
committerSean Whitton <spwhitton@spwhitton.name>2017-03-01 06:37:57 -0700
commit589827273e55e9abe7194a0d6271ca97719e8911 (patch)
treed355b3a33a5a948e259ddf7843391b47b48e3e03 /Types
parent67a213e550f82936dadf83918f40ff68f2cb51f9 (diff)
downloadsscan-589827273e55e9abe7194a0d6271ca97719e8911.tar.gz
implement scanPage
Diffstat (limited to 'Types')
-rw-r--r--Types/State.hs5
1 files changed, 5 insertions, 0 deletions
diff --git a/Types/State.hs b/Types/State.hs
index 5100c9a..02ff6a2 100644
--- a/Types/State.hs
+++ b/Types/State.hs
@@ -123,3 +123,8 @@ incrementPages st = case st^.stScanSess of
Nothing -> st
Just (ScanSess c p d) ->
st & stScanSess .~ (Just $ ScanSess c (p+1) d)
+
+getLatestPage :: St -> Int
+getLatestPage st = case st^.stScanSess of
+ Nothing -> 0
+ Just (ScanSess _ p _ ) -> p