mirror of
https://github.com/samuelclay/NewsBlur.git
synced 2025-09-18 21:50:56 +00:00
Adding options popover (and read_filter) to all shared stories and global shared stories.
This commit is contained in:
parent
f272013e4b
commit
f5bd024dc6
5 changed files with 11 additions and 6 deletions
|
@ -196,8 +196,9 @@ class UserSubscription(models.Model):
|
|||
r.delete(unread_stories_key)
|
||||
|
||||
dump = r.dump(unread_ranked_stories_key)
|
||||
rt.restore(unread_ranked_stories_key, 1*60*60, dump)
|
||||
r.delete(unread_ranked_stories_key)
|
||||
if dump:
|
||||
rt.restore(unread_ranked_stories_key, 1*60*60, dump)
|
||||
r.delete(unread_ranked_stories_key)
|
||||
|
||||
current_time = int(time.time() + 60*60*24)
|
||||
if not cutoff_date:
|
||||
|
|
|
@ -1033,6 +1033,8 @@ class MSocialSubscription(mongo.Document):
|
|||
rt.exists(ranked_stories_keys) and
|
||||
rt.exists(unread_ranked_stories_keys)):
|
||||
story_hashes_and_dates = range_func(ranked_stories_keys, offset, limit, withscores=True)
|
||||
if not story_hashes_and_dates:
|
||||
return [], [], []
|
||||
story_hashes, story_dates = zip(*story_hashes_and_dates)
|
||||
if read_filter == "unread":
|
||||
unread_story_hashes = story_hashes
|
||||
|
|
|
@ -605,8 +605,8 @@ NEWSBLUR.AssetModel = Backbone.Router.extend({
|
|||
this.make_request('/social/river_stories', {
|
||||
page: page,
|
||||
order: this.view_setting(feed_id, 'order'),
|
||||
global_feed: options.global
|
||||
// read_filter: this.view_setting(feed_id, 'read_filter')
|
||||
global_feed: options.global,
|
||||
read_filter: this.view_setting(feed_id, 'read_filter')
|
||||
}, pre_callback, error_callback, {
|
||||
'ajax_group': (page ? 'feed_page' : 'feed'),
|
||||
'request_type': 'GET'
|
||||
|
|
|
@ -1659,7 +1659,8 @@
|
|||
this.active_folder = new Backbone.Model({
|
||||
id: this.active_feed,
|
||||
folder_title: options.global ? "Global Shared Stories" : "All Shared Stories",
|
||||
fake: true
|
||||
fake: true,
|
||||
show_options: true
|
||||
});
|
||||
|
||||
if (options.global) {
|
||||
|
|
|
@ -68,7 +68,8 @@ NEWSBLUR.Views.StoryTitlesHeader = Backbone.View.extend({
|
|||
', {
|
||||
folder_title: this.fake_folder_title(),
|
||||
folder_id: NEWSBLUR.reader.active_feed,
|
||||
show_options: !NEWSBLUR.reader.active_folder.get('fake')
|
||||
show_options: !NEWSBLUR.reader.active_folder.get('fake') ||
|
||||
NEWSBLUR.reader.active_folder.get('show_options')
|
||||
}));
|
||||
} else if (NEWSBLUR.reader.flags['river_view'] &&
|
||||
NEWSBLUR.reader.active_folder &&
|
||||
|
|
Loading…
Add table
Reference in a new issue