FIX: featured link topics shouldn't require the same min post length

This commit is contained in:
Neil Lalonde
2016-12-09 15:46:26 -05:00
parent 5da52780e4
commit fb2633366a
4 changed files with 9 additions and 8 deletions
@@ -286,7 +286,7 @@ const Composer = RestModel.extend({
@computed('minimumPostLength', 'replyLength', 'canEditTopicFeaturedLink')
missingReplyCharacters(minimumPostLength, replyLength, canEditTopicFeaturedLink) {
if (this.get('post.post_type') === this.site.get('post_types.small_action') ||
canEditTopicFeaturedLink && this.siteSettings.topic_featured_link_onebox) { return 0; }
canEditTopicFeaturedLink && this.get('featuredLink')) { return 0; }
return minimumPostLength - replyLength;
},
@@ -509,9 +509,7 @@ const Composer = RestModel.extend({
if (!this.get('cantSubmitPost')) {
// change category may result in some effect for topic featured link
if (this.get('canEditTopicFeaturedLink')) {
if (this.siteSettings.topic_featured_link_onebox) { this.set('reply', null); }
} else {
if (!this.get('canEditTopicFeaturedLink')) {
this.set('featuredLink', null);
}