mirror of
https://github.com/samuelclay/NewsBlur.git
synced 2025-04-13 09:42:01 +00:00
Fixing new stories coming into dashboard being filtered out incorrectly.
This commit is contained in:
parent
cd90b968fd
commit
e8fb94af23
3 changed files with 10 additions and 12 deletions
|
@ -859,9 +859,6 @@ hr {
|
||||||
opacity: 1;
|
opacity: 1;
|
||||||
}
|
}
|
||||||
*/
|
*/
|
||||||
.NB-feedlist .folder.NB-selected > .folder_title .feed_counts_floater {
|
|
||||||
margin-right: 24px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.NB-feedlist .feed.NB-toplevel:hover .feed_favicon {
|
.NB-feedlist .feed.NB-toplevel:hover .feed_favicon {
|
||||||
display: none;
|
display: none;
|
||||||
|
|
|
@ -90,7 +90,7 @@ NEWSBLUR.Views.DashboardRiver = Backbone.View.extend({
|
||||||
this.$(".NB-module-river-settings").html($options);
|
this.$(".NB-module-river-settings").html($options);
|
||||||
},
|
},
|
||||||
|
|
||||||
feeds: function () {
|
feeds: function (include_read) {
|
||||||
var river_id = this.model.get('river_id');
|
var river_id = this.model.get('river_id');
|
||||||
|
|
||||||
if (_.string.startsWith(river_id, 'feed:')) {
|
if (_.string.startsWith(river_id, 'feed:')) {
|
||||||
|
@ -107,13 +107,13 @@ NEWSBLUR.Views.DashboardRiver = Backbone.View.extend({
|
||||||
|
|
||||||
var feeds;
|
var feeds;
|
||||||
var visible_only = NEWSBLUR.assets.view_setting(river_id, 'read_filter') == 'unread';
|
var visible_only = NEWSBLUR.assets.view_setting(river_id, 'read_filter') == 'unread';
|
||||||
if (visible_only) {
|
if (visible_only && !include_read) {
|
||||||
feeds = _.pluck(active_folder.feeds_with_unreads(), 'id');
|
feeds = _.pluck(active_folder.feeds_with_unreads(), 'id');
|
||||||
}
|
}
|
||||||
if (!feeds || !feeds.length) {
|
if (!feeds || !feeds.length) {
|
||||||
feeds = active_folder.feed_ids_in_folder();
|
feeds = active_folder.feed_ids_in_folder();
|
||||||
}
|
}
|
||||||
|
console.log(['River feeds', river_id, feeds.length, feeds]);
|
||||||
return feeds;
|
return feeds;
|
||||||
},
|
},
|
||||||
|
|
||||||
|
@ -338,16 +338,17 @@ NEWSBLUR.Views.DashboardRiver = Backbone.View.extend({
|
||||||
if (feed_stories_per_month > NEWSBLUR.assets.preference('infrequent_stories_per_month')) {
|
if (feed_stories_per_month > NEWSBLUR.assets.preference('infrequent_stories_per_month')) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
}
|
} else if (this.options.global_feed) {
|
||||||
|
|
||||||
if (this.options.global_feed) {
|
|
||||||
// Global Shared Stories don't come in real-time (yet)
|
// Global Shared Stories don't come in real-time (yet)
|
||||||
return;
|
return;
|
||||||
|
} else if (!_.contains(this.feeds(true), parseInt(feed_id, 10))) {
|
||||||
|
console.log(['New story not in folder', this.model.get('river_id'), feed_id, this.feeds()]);
|
||||||
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
var subs = feed.get('num_subscribers');
|
var subs = feed.get('num_subscribers');
|
||||||
var delay = subs * 2; // 1,000 subs = 2 seconds
|
var delay = subs * 2; // 1,000 subs = 2 seconds
|
||||||
console.log(['Fetching dashboard story', story_hash, delay + 'ms delay']);
|
console.log(['Fetching dashboard story', this.model.get('river_id'), story_hash, delay + 'ms delay']);
|
||||||
|
|
||||||
_.delay(_.bind(function() {
|
_.delay(_.bind(function() {
|
||||||
NEWSBLUR.assets.add_dashboard_story(story_hash, this.options.dashboard_stories);
|
NEWSBLUR.assets.add_dashboard_story(story_hash, this.options.dashboard_stories);
|
||||||
|
|
|
@ -144,7 +144,7 @@ def pre_process_story(entry, encoding):
|
||||||
|
|
||||||
if 'summary_detail' in entry and entry['summary_detail'].get('type', None) == 'text/plain':
|
if 'summary_detail' in entry and entry['summary_detail'].get('type', None) == 'text/plain':
|
||||||
try:
|
try:
|
||||||
entry['story_content'] = feedparser._sanitizeHTML(entry['story_content'], encoding, 'text/plain')
|
entry['story_content'] = feedparser.sanitizer._sanitize_html(entry['story_content'], encoding, 'text/plain')
|
||||||
if encoding and not isinstance(entry['story_content'], str):
|
if encoding and not isinstance(entry['story_content'], str):
|
||||||
entry['story_content'] = entry['story_content'].decode(encoding, 'ignore')
|
entry['story_content'] = entry['story_content'].decode(encoding, 'ignore')
|
||||||
except UnicodeEncodeError:
|
except UnicodeEncodeError:
|
||||||
|
|
Loading…
Add table
Reference in a new issue