-function viewfeed(feed, method, is_cat, offset, background, infscroll_req) {
- try {
- if (is_cat == undefined)
- is_cat = false;
- else
- is_cat = !!is_cat;
+ dijits.each(function (d) {
+ dojo.destroy(d.domNode);
+ });
+
+ $$("#" + root + " *").each(function (i) {
+ i.parentNode ? i.parentNode.removeChild(i) : true;
+ });
+}
+
+function viewfeed(params) {
+ const feed = params.feed;
+ let is_cat = params.is_cat;
+ let offset = params.offset;
+ let background = params.background;
+ let infscroll_req = params.infscroll_req;
+ const can_wait = params.can_wait;
+ const viewfeed_debug = params.viewfeed_debug;
+ const method = params.method;
+
+ if (is_cat == undefined)
+ is_cat = false;
+ else
+ is_cat = !!is_cat;
+
+ if (offset == undefined) offset = 0;
+ if (background == undefined) background = false;
+ if (infscroll_req == undefined) infscroll_req = false;
+
+ last_requested_article = 0;
+
+ if (feed != getActiveFeedId() || activeFeedIsCat() != is_cat) {
+ if (!background && _search_query) _search_query = false;
+ }