From 4abd5acd53d5dd5acb2b596b90b7ad06b41f7dee Mon Sep 17 00:00:00 2001 From: "byte[]" Date: Wed, 29 Apr 2020 23:49:19 -0400 Subject: [PATCH] prevent page gaps from appearing where they are not supposed to, fixes #98 --- lib/philomena_web/views/pagination_view.ex | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/philomena_web/views/pagination_view.ex b/lib/philomena_web/views/pagination_view.ex index 7bdbb618..5d8aca19 100644 --- a/lib/philomena_web/views/pagination_view.ex +++ b/lib/philomena_web/views/pagination_view.ex @@ -19,7 +19,7 @@ defmodule PhilomenaWeb.PaginationView do def last_page_path(page, route, params), do: page_path(route, params, page.total_pages) def left_gap?(page) do - page.page_number >= 5 + page.page_number >= 7 end def left_page_numbers(page) do @@ -32,7 +32,7 @@ defmodule PhilomenaWeb.PaginationView do end def right_gap?(page) do - page.total_pages - page.page_number >= 5 + page.total_pages - page.page_number >= 6 end def right_page_numbers(page) do