1
0
mirror of https://git.tt-rss.org/git/tt-rss.git synced 2025-12-13 11:55:56 +00:00

filter by search results while marking feed as read

This commit is contained in:
Andrew Dolgov
2017-03-31 11:21:35 +03:00
parent 86e534290e
commit 337535416f
5 changed files with 127 additions and 120 deletions

View File

@@ -484,28 +484,31 @@ function catchupFeed(feed, is_cat, mode) {
switch (mode) {
case "1day":
str = __("Mark all articles in %s older than 1 day as read?");
str = __("Mark %w in %s older than 1 day as read?");
break;
case "1week":
str = __("Mark all articles in %s older than 1 week as read?");
str = __("Mark %w in %s older than 1 week as read?");
break;
case "2week":
str = __("Mark all articles in %s older than 2 weeks as read?");
str = __("Mark %w in %s older than 2 weeks as read?");
break;
default:
str = __("Mark all articles in %s as read?");
str = __("Mark %w in %s as read?");
}
var mark_what = last_search_query && last_search_query[0] ? __("search results") : __("all articles");
var fn = getFeedName(feed, is_cat);
str = str.replace("%s", fn);
str = str.replace("%s", fn)
.replace("%w", mark_what);
if (getInitParam("confirm_feed_catchup") == 1 && !confirm(str)) {
return;
}
var catchup_query = "?op=rpc&method=catchupFeed&feed_id=" +
feed + "&is_cat=" + is_cat + "&mode=" + mode;
var catchup_query = {op: 'rpc', method: 'catchupFeed', feed_id: feed,
is_cat: is_cat, mode: mode, search_query: last_search_query[0],
search_lang: last_search_query[1]};
console.log(catchup_query);

View File

@@ -13,6 +13,7 @@ var loaded_article_ids = [];
var _last_headlines_update = 0;
var _headlines_scroll_offset = 0;
var current_first_id = 0;
var last_search_query;
var _catchup_request_sent = false;
@@ -38,6 +39,7 @@ function headlines_callback2(transport, offset, background, infscroll_req) {
is_cat = reply['headlines']['is_cat'];
feed_id = reply['headlines']['id'];
last_search_query = reply['headlines']['search_query'];
if (background) {
var content = reply['headlines']['content'];