From 2f04fc5193c75421809c657dd2fb66a3f907c154 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Hugo=20H=C3=B6rnquist?= Date: Mon, 10 Aug 2020 13:42:20 +0200 Subject: Add comment about final page. --- module/vcomponent/search.scm | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'module/vcomponent') diff --git a/module/vcomponent/search.scm b/module/vcomponent/search.scm index fab53f79..a5e8c4ce 100644 --- a/module/vcomponent/search.scm +++ b/module/vcomponent/search.scm @@ -145,6 +145,10 @@ '()) (let ((result (stream->list (stream-ref (get-query paginator) page)))) + ;; This check isn't strictly necessary, but without it + ;; we always needs to force the next page. And since this + ;; page is "incomplete" we already know that this is the + ;; final page. (when (> 10 (length result)) (set-true-max-page! paginator)) -- cgit v1.2.3