mirror of
https://github.com/samuelclay/NewsBlur.git
synced 2025-09-18 21:50:56 +00:00
Using hints on shared stories index.
This commit is contained in:
parent
5c11f12834
commit
d7e2c5d3b0
2 changed files with 3 additions and 1 deletions
|
@ -115,6 +115,7 @@ def load_social_stories(request, user_id, username=None):
|
|||
.only('story_hash', 'starred_date', 'user_tags')
|
||||
shared_stories = MSharedStory.objects(user_id=user.pk,
|
||||
story_hash__in=story_hashes)\
|
||||
.hint([('story_hash', 1)])\
|
||||
.only('story_hash', 'shared_date', 'comments')
|
||||
starred_stories = dict([(story.story_hash, dict(starred_date=story.starred_date,
|
||||
user_tags=story.user_tags))
|
||||
|
@ -252,6 +253,7 @@ def load_river_blurblog(request):
|
|||
for story in starred_stories])
|
||||
shared_stories = MSharedStory.objects(user_id=user.pk,
|
||||
story_hash__in=story_hashes)\
|
||||
.hint([('story_hash', 1)])\
|
||||
.only('story_hash', 'shared_date', 'comments')
|
||||
shared_stories = dict([(story.story_hash, dict(shared_date=story.shared_date,
|
||||
comments=story.comments))
|
||||
|
|
|
@ -89,7 +89,7 @@ NEWSBLUR.Views.SocialPage = Backbone.View.extend({
|
|||
if (search_story_guid && this.auto_advance_pages < this.MAX_AUTO_ADVANCED_PAGES) {
|
||||
var found_story = _.detect(this.stories, function(story) {
|
||||
var hash = story.model.get('story_feed_id') + ":" + story.story_guid;
|
||||
return hash == search_story_guid;
|
||||
return hash.indexOf(search_story_guid) >= 0;
|
||||
});
|
||||
if (found_story) {
|
||||
var found_guid = found_story.story_guid;
|
||||
|
|
Loading…
Add table
Reference in a new issue