From cc58377a48d13ef85cedb5ec0e19eb8b879dd497 Mon Sep 17 00:00:00 2001 From: Joris Date: Mon, 28 Mar 2016 18:04:25 +0200 Subject: Compute payment count client side --- src/client/elm/LoggedIn/Home/View/Paging.elm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/client/elm/LoggedIn/Home/View') diff --git a/src/client/elm/LoggedIn/Home/View/Paging.elm b/src/client/elm/LoggedIn/Home/View/Paging.elm index 31aa032..9942aa8 100644 --- a/src/client/elm/LoggedIn/Home/View/Paging.elm +++ b/src/client/elm/LoggedIn/Home/View/Paging.elm @@ -23,7 +23,7 @@ showedPages = 5 paymentsPaging : Address Action -> HomeModel.Model -> Html paymentsPaging address homeModel = - let maxPage = ceiling (toFloat homeModel.paymentsCount / toFloat perPage) + let maxPage = ceiling (toFloat (List.length homeModel.payments) / toFloat perPage) pages = truncatePages homeModel.currentPage [1..maxPage] in if maxPage == 1 then -- cgit v1.2.3