From 2cedac8c58298a554b3bc45adcf336aa0c4341e6 Mon Sep 17 00:00:00 2001 From: Omar Roth Date: Tue, 14 Aug 2018 19:15:33 -0500 Subject: [PATCH] Don't show 'next page' or 'previous page' where not applicable --- src/invidious/views/channel.ecr | 6 +++--- src/invidious/views/search.ecr | 4 +--- src/invidious/views/subscriptions.ecr | 8 ++++---- 3 files changed, 8 insertions(+), 10 deletions(-) diff --git a/src/invidious/views/channel.ecr b/src/invidious/views/channel.ecr index c47342ad..ab8c0b2e 100644 --- a/src/invidious/views/channel.ecr +++ b/src/invidious/views/channel.ecr @@ -41,14 +41,14 @@
- <% if page > 2 %> + <% if page >= 2 %> Previous page - <% else %> - Previous page <% end %>
+ <% if videos.size == 100 %> Next page + <% end %>
\ No newline at end of file diff --git a/src/invidious/views/search.ecr b/src/invidious/views/search.ecr index 1ec98430..350adc4b 100644 --- a/src/invidious/views/search.ecr +++ b/src/invidious/views/search.ecr @@ -12,10 +12,8 @@
- <% if page > 2 %> + <% if page >= 2 %> Previous page - <% else %> - Previous page <% end %>
diff --git a/src/invidious/views/subscriptions.ecr b/src/invidious/views/subscriptions.ecr index 09d5e083..9ca38c70 100644 --- a/src/invidious/views/subscriptions.ecr +++ b/src/invidious/views/subscriptions.ecr @@ -38,14 +38,14 @@
- <% if page > 2 %> + <% if page >= 2 %> Previous page - <% else %> - Previous page <% end %>
- Next page + <% if (videos.size + notifications.size) == max_results %> + Next page + <% end %>
\ No newline at end of file