diff options
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 |