aboutsummaryrefslogtreecommitdiffhomepage
path: root/Types/State.hs
diff options
context:
space:
mode:
Diffstat (limited to 'Types/State.hs')
-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