FIX: Only use cached list when we have less than 1 page worth of topics.
We only need it then to maintain the scroll position.
This commit is contained in:
parent
f4f54fd49b
commit
5dea3720a4
|
@ -206,9 +206,10 @@ Discourse.TopicList.reopenClass({
|
|||
if (extras.cached) {
|
||||
var cachedList = session.get('topicList');
|
||||
|
||||
// Try to use the cached version
|
||||
// Try to use the cached version if it exists and is greater than the topics per page
|
||||
if (cachedList && (cachedList.get('filter') === filter) &&
|
||||
_.isEqual(cachedList.get('listParams'), filterParams)) {
|
||||
(cachedList.get('topics.length') || 0) > Discourse.SiteSettings.topics_per_page &&
|
||||
_.isEqual(cachedList.get('listParams'), filterParams)) {
|
||||
cachedList.set('loaded', true);
|
||||
|
||||
if (tracking) {
|
||||
|
|
|
@ -154,6 +154,7 @@ basic:
|
|||
topics_per_page:
|
||||
default: 30
|
||||
min: 1
|
||||
client: true
|
||||
show_subcategory_list:
|
||||
default: false
|
||||
client: true
|
||||
|
|
Loading…
Reference in New Issue