diff options
author | Joris | 2015-12-30 00:28:41 +0100 |
---|---|---|
committer | Joris | 2015-12-30 00:32:44 +0100 |
commit | e32a9126ae7fd7f9596dd08b64ecab8644d994bd (patch) | |
tree | 8680faa00c624b81052f3617e6baf7ff8ea9645d /src/client/elm/View/LoggedIn | |
parent | a7db22556b91bc7c499e010b4c051f4442ad8ce2 (diff) |
Upgrade to elm 0.16.0
Diffstat (limited to 'src/client/elm/View/LoggedIn')
-rw-r--r-- | src/client/elm/View/LoggedIn/Paging.elm | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/client/elm/View/LoggedIn/Paging.elm b/src/client/elm/View/LoggedIn/Paging.elm index 93d7f1d..608113b 100644 --- a/src/client/elm/View/LoggedIn/Paging.elm +++ b/src/client/elm/View/LoggedIn/Paging.elm @@ -46,12 +46,12 @@ truncatePages currentPage pages = showedLeftPages = ceiling ((toFloat showedPages - 1) / 2) showedRightPages = floor ((toFloat showedPages - 1) / 2) truncatedPages = - if | currentPage < showedLeftPages -> - [1..showedPages] - | currentPage > totalPages - showedRightPages -> - [(totalPages - showedPages)..totalPages] - | otherwise -> - [(currentPage - showedLeftPages)..(currentPage + showedRightPages)] + if currentPage < showedLeftPages then + [1..showedPages] + else if currentPage > totalPages - showedRightPages then + [(totalPages - showedPages)..totalPages] + else + [(currentPage - showedLeftPages)..(currentPage + showedRightPages)] in List.filter (flip List.member pages) truncatedPages firstPage : Html |