mirror of
https://git.tt-rss.org/git/tt-rss.git
synced 2025-12-13 16:45:55 +00:00
append headline buffer if requested, don't just use offset
This commit is contained in:
@@ -282,6 +282,7 @@ define(["dojo/_base/declare"], function (declare) {
|
|||||||
const is_cat = !!params.is_cat || false;
|
const is_cat = !!params.is_cat || false;
|
||||||
const offset = params.offset || 0;
|
const offset = params.offset || 0;
|
||||||
const viewfeed_debug = params.viewfeed_debug;
|
const viewfeed_debug = params.viewfeed_debug;
|
||||||
|
const append = params.append || false;
|
||||||
const method = params.method;
|
const method = params.method;
|
||||||
// this is used to quickly switch between feeds, sets active but xhr is on a timeout
|
// this is used to quickly switch between feeds, sets active but xhr is on a timeout
|
||||||
const delayed = params.delayed || false;
|
const delayed = params.delayed || false;
|
||||||
@@ -349,7 +350,7 @@ define(["dojo/_base/declare"], function (declare) {
|
|||||||
try {
|
try {
|
||||||
window.clearTimeout(this._infscroll_timeout);
|
window.clearTimeout(this._infscroll_timeout);
|
||||||
this.setExpando(feed, is_cat, 'images/blank_icon.gif');
|
this.setExpando(feed, is_cat, 'images/blank_icon.gif');
|
||||||
Headlines.onLoaded(transport, offset);
|
Headlines.onLoaded(transport, offset, append);
|
||||||
PluginHost.run(PluginHost.HOOK_FEED_LOADED, [feed, is_cat]);
|
PluginHost.run(PluginHost.HOOK_FEED_LOADED, [feed, is_cat]);
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
App.Error.report(e);
|
App.Error.report(e);
|
||||||
|
|||||||
@@ -218,7 +218,7 @@ define(["dojo/_base/declare"], function (declare) {
|
|||||||
|
|
||||||
console.log("loadMore, offset=", offset);
|
console.log("loadMore, offset=", offset);
|
||||||
|
|
||||||
Feeds.open({feed: Feeds.getActive(), is_cat: Feeds.activeIsCat(), offset: offset});
|
Feeds.open({feed: Feeds.getActive(), is_cat: Feeds.activeIsCat(), offset: offset, append: true});
|
||||||
},
|
},
|
||||||
scrollHandler: function () {
|
scrollHandler: function () {
|
||||||
try {
|
try {
|
||||||
@@ -529,10 +529,10 @@ define(["dojo/_base/declare"], function (declare) {
|
|||||||
|
|
||||||
return tmp.firstChild;
|
return tmp.firstChild;
|
||||||
},
|
},
|
||||||
onLoaded: function (transport, offset) {
|
onLoaded: function (transport, offset, append) {
|
||||||
const reply = App.handleRpcJson(transport);
|
const reply = App.handleRpcJson(transport);
|
||||||
|
|
||||||
console.log("Headlines.onLoaded: offset=", offset);
|
console.log("Headlines.onLoaded: offset=", offset, "append=", append);
|
||||||
|
|
||||||
let is_cat = false;
|
let is_cat = false;
|
||||||
let feed_id = false;
|
let feed_id = false;
|
||||||
@@ -573,7 +573,7 @@ define(["dojo/_base/declare"], function (declare) {
|
|||||||
//this.vgroup_last_feed = reply['headlines-info']['vgroup_last_feed'];
|
//this.vgroup_last_feed = reply['headlines-info']['vgroup_last_feed'];
|
||||||
this.current_first_id = reply['headlines']['first_id'];
|
this.current_first_id = reply['headlines']['first_id'];
|
||||||
|
|
||||||
if (offset == 0) {
|
if (!append) {
|
||||||
//this.headlines = [];
|
//this.headlines = [];
|
||||||
this.vgroup_last_feed = undefined;
|
this.vgroup_last_feed = undefined;
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user