mirror of
https://github.com/samuelclay/NewsBlur.git
synced 2025-08-21 05:45:13 +00:00
Fixing story truncation preference.
This commit is contained in:
parent
acd408146b
commit
dc9e21e352
2 changed files with 9 additions and 7 deletions
|
@ -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 =
|
||||
// ==============
|
||||
|
|
|
@ -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() {
|
||||
|
|
Loading…
Add table
Reference in a new issue