if (!background) {
_viewfeed_last = get_timestamp();
- if (getActiveFeedId() != feed || offset == 0) {
+ if (getActiveFeedId() != feed || !infscroll_req) {
setActiveArticleId(0);
_infscroll_disable = 0;
}
- if (offset != 0 && !method) {
+ if (infscroll_req && !method) {
var timestamp = get_timestamp();
if (_infscroll_request_sent && _infscroll_request_sent + 30 > timestamp) {
}
}
+ console.log("cur: " + getActiveArticleId() + " next: " + next_id);
+
if (mode == "next") {
- if (next_id || getActiveArticleId()) {
+ if (next_id /*|| getActiveArticleId()*/) {
if (isCdmMode()) {
var article = $("RROW-" + getActiveArticleId());
var row = $("RROW-" + id);
if (row) {
+ var tmpClassName = row.className;
+
if (cmode == undefined || cmode == 2) {
if (row.hasClassName("Unread")) {
row.removeClassName("Unread");
// notify_progress("Loading, please wait...");
- new Ajax.Request("backend.php", {
- parameters: query,
- onComplete: function(transport) {
- handle_rpc_json(transport);
- } });
+ if (tmpClassName != row.className) {
+ new Ajax.Request("backend.php", {
+ parameters: query,
+ onComplete: function (transport) {
+ handle_rpc_json(transport);
+ }
+ });
+ }
}
}
function setActiveArticleId(id) {
+ console.log("setActiveArticleId:" + id);
+
_active_article_id = id;
PluginHost.run(PluginHost.HOOK_ARTICLE_SET_ACTIVE, _active_article_id);
}
}
if (!_infscroll_disable) {
- if (hsp && hsp.offsetTop - 100 <= e.scrollTop + e.offsetHeight) {
+ if (hsp && hsp.offsetTop - 250 <= e.scrollTop + e.offsetHeight) {
hsp.innerHTML = "<span class='loading'><img src='images/indicator_tiny.gif'> " +
__("Loading, please wait...") + "</span>";