mirror of
https://github.com/discourse/discourse.git
synced 2025-09-06 10:50:21 +08:00
latest.json: last topic from first page appears on the second page as well.
This commit is contained in:
parent
c5ae648746
commit
06366b5379
1 changed files with 1 additions and 1 deletions
|
@ -315,7 +315,7 @@ class TopicQuery
|
||||||
if page == 0
|
if page == 0
|
||||||
(pinned_topics + unpinned_topics)[0...limit] if limit
|
(pinned_topics + unpinned_topics)[0...limit] if limit
|
||||||
else
|
else
|
||||||
offset = (page * per_page) - pinned_topics.count - 1
|
offset = (page * per_page) - pinned_topics.count
|
||||||
offset = 0 unless offset > 0
|
offset = 0 unless offset > 0
|
||||||
unpinned_topics.offset(offset).to_a
|
unpinned_topics.offset(offset).to_a
|
||||||
end
|
end
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue