Prevent Index.scroll() from firing while loading the Index

This commit is contained in:
Zixaphir 2014-01-10 22:56:26 -07:00
parent c61c71c764
commit d0e0a21e2f
3 changed files with 3 additions and 3 deletions

View File

@ -2318,7 +2318,7 @@
},
scroll: $.debounce(100, function() {
var nodes, nodesPerPage, pageNum;
if (Conf['Index Mode'] !== 'paged' || (doc.scrollTop <= doc.scrollHeight - (300 + window.innerHeight)) || g.VIEW === 'thread') {
if (Index.req || Conf['Index Mode'] !== 'paged' || (doc.scrollTop <= doc.scrollHeight - (300 + window.innerHeight)) || g.VIEW === 'thread') {
return;
}
pageNum = Index.getCurrentPage() + 1;

View File

@ -2328,7 +2328,7 @@
},
scroll: $.debounce(100, function() {
var nodes, nodesPerPage, pageNum;
if (Conf['Index Mode'] !== 'paged' || (doc.scrollTop <= doc.scrollHeight - (300 + window.innerHeight)) || g.VIEW === 'thread') {
if (Index.req || Conf['Index Mode'] !== 'paged' || (doc.scrollTop <= doc.scrollHeight - (300 + window.innerHeight)) || g.VIEW === 'thread') {
return;
}
pageNum = Index.getCurrentPage() + 1;

View File

@ -108,7 +108,7 @@ Index =
$.after $.id('delform'), Index.pagelist
scroll: $.debounce 100, ->
return if Conf['Index Mode'] isnt 'paged' or (doc.scrollTop <= doc.scrollHeight - (300 + window.innerHeight)) or g.VIEW is 'thread'
return if Index.req or Conf['Index Mode'] isnt 'paged' or (doc.scrollTop <= doc.scrollHeight - (300 + window.innerHeight)) or g.VIEW is 'thread'
pageNum = Index.getCurrentPage() + 1
return Index.endNotice() if pageNum >= Index.pagesNum
nodesPerPage = Index.threadsNumPerPage * 2