mirror of
https://github.com/samuelclay/NewsBlur.git
synced 2025-09-18 21:50:56 +00:00
Fixing a bad index on blurblogs.
This commit is contained in:
parent
fde0c6caef
commit
5c11f12834
3 changed files with 7 additions and 5 deletions
|
@ -2051,7 +2051,7 @@ class MSharedStory(mongo.Document):
|
|||
return "%sstory/%s/%s" % (
|
||||
profile.blurblog_url,
|
||||
slugify(self.story_title)[:20],
|
||||
self.guid_hash[:6]
|
||||
self.story_hash
|
||||
)
|
||||
|
||||
def generate_post_to_service_message(self, truncate=None, include_url=True):
|
||||
|
|
|
@ -449,7 +449,7 @@ def load_social_page(request, user_id, username=None, **kwargs):
|
|||
social_services = MSocialServices.get_user(social_user.pk)
|
||||
|
||||
active_story_db = MSharedStory.objects.filter(user_id=social_user.pk,
|
||||
story_guid_hash=story_id).limit(1)
|
||||
story_hash=story_id).limit(1)
|
||||
if active_story_db:
|
||||
active_story_db = active_story_db[0]
|
||||
if user_social_profile.bb_permalink_direct:
|
||||
|
|
|
@ -87,10 +87,12 @@ NEWSBLUR.Views.SocialPage = Backbone.View.extend({
|
|||
find_story: function() {
|
||||
var search_story_guid = NEWSBLUR.router.story_guid;
|
||||
if (search_story_guid && this.auto_advance_pages < this.MAX_AUTO_ADVANCED_PAGES) {
|
||||
var found_guid = _.detect(_.keys(this.stories), function(guid) {
|
||||
return guid.indexOf(search_story_guid) == 0;
|
||||
var found_story = _.detect(this.stories, function(story) {
|
||||
var hash = story.model.get('story_feed_id') + ":" + story.story_guid;
|
||||
return hash == search_story_guid;
|
||||
});
|
||||
if (found_guid) {
|
||||
if (found_story) {
|
||||
var found_guid = found_story.story_guid;
|
||||
var story_view = this.stories[found_guid];
|
||||
_.delay(_.bind(this.scroll_to_story, this, story_view, 1), 0);
|
||||
_.delay(_.bind(this.scroll_to_story, this, story_view, 3), 800);
|
||||
|
|
Loading…
Add table
Reference in a new issue