瀏覽代碼

Fix next_page heuristic

master
Dylan Baker 4 年之前
父節點
當前提交
59bb48b2ef
共有 1 個檔案被更改,包括 1 行新增1 行删除
  1. 1
    1
      web/server.rb

+ 1
- 1
web/server.rb 查看文件

@@ -88,7 +88,7 @@ class VLVSearch < Sinatra::Base
88 88
       current_page = params[:page].to_i
89 89
       previous_page = current_page > 1 ? current_page - 1 : nil
90 90
 
91
-      if params[:current_count] == params[:full_count]
91
+      if (params[:current_count] + ((current_page - 1) * RESULTS_PER_PAGE)) == params[:full_count]
92 92
         next_page = nil
93 93
       else
94 94
         next_page = current_page + 1

Loading…
取消
儲存