mirror of
https://github.com/NodeBB/NodeBB.git
synced 2025-10-26 08:36:12 +01:00
perf: don't load unread page again if everything already loaded
this only applies when you have only 1-2 unread topics, side effect from https://github.com/NodeBB/NodeBB/pull/9525
This commit is contained in:
@@ -20,8 +20,9 @@ define('forum/infinitescroll', ['hooks', 'alerts', 'api'], function (hooks, aler
|
||||
}
|
||||
previousScrollTop = $(window).scrollTop();
|
||||
$(window).off('scroll', startScrollTimeout).on('scroll', startScrollTimeout);
|
||||
|
||||
if ($body.height() <= $(window).height()) {
|
||||
if ($body.height() <= $(window).height() && (
|
||||
!ajaxify.data.hasOwnProperty('pageCount') || ajaxify.data.pageCount > 1
|
||||
)) {
|
||||
callback(1);
|
||||
}
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user