trigger loadMoreHeadlines in view() when rendering local article only

This commit is contained in:
Andrew Dolgov 2011-09-21 09:32:39 +04:00
parent 04b252fdec
commit b3e8867c65
1 changed files with 13 additions and 1 deletions

View File

@ -349,8 +349,20 @@ function view(id) {
// if we don't need to request any relative ids, we might as well skip
// the server roundtrip altogether
if (cids_to_request.length == 0)
if (cids_to_request.length == 0) {
try {
if (!_infscroll_disable &&
$$("#headlines-frame > div[id*=RROW]").last().hasClassName("Selected")) {
loadMoreHeadlines();
}
} catch (e) {
console.warn(e);
}
return;
}
}
last_requested_article = id;