Fixing story truncation preference.

This commit is contained in:
Samuel Clay 2013-02-06 14:40:15 -08:00
parent acd408146b
commit dc9e21e352
2 changed files with 9 additions and 7 deletions

View file

@ -462,12 +462,6 @@
}
},
is_truncatable: function() {
return NEWSBLUR.assets.preference("truncate_story") == 'all' ||
(NEWSBLUR.assets.preference("truncate_story") == 'social' &&
this.flags['social_view']);
},
// ==============
// = Navigation =
// ==============

View file

@ -96,7 +96,7 @@ NEWSBLUR.Views.StoryDetailView = Backbone.View.extend({
authors_score : this.classifiers && this.classifiers.authors[this.model.get('story_authors')],
tags_score : this.classifiers && this.classifiers.tags,
options : this.options,
truncatable : NEWSBLUR.reader.is_truncatable()
truncatable : this.is_truncatable()
};
},
@ -206,6 +206,12 @@ NEWSBLUR.Views.StoryDetailView = Backbone.View.extend({
$header.css('textShadow', NEWSBLUR.utils.generate_shadow(this.feed));
},
is_truncatable: function() {
return NEWSBLUR.assets.preference("truncate_story") == 'all' ||
(NEWSBLUR.assets.preference("truncate_story") == 'social' &&
NEWSBLUR.reader.flags['social_view']);
},
make_story_title: function(story) {
story = story || this.model;
var title = story.get('story_title');
@ -350,6 +356,8 @@ NEWSBLUR.Views.StoryDetailView = Backbone.View.extend({
},
watch_images_for_story_height: function() {
if (!this.is_truncatable()) return;
this.truncate_story_height();
this.$('img').load(_.bind(function() {