1
0
mirror of https://github.com/flarum/core.git synced 2025-07-30 21:20:24 +02:00

Excerpt added to core

This commit is contained in:
Toby Zerner
2018-02-04 12:53:52 +10:30
parent 4c8bea217b
commit 6138794712
2 changed files with 2 additions and 18 deletions

View File

@@ -11,11 +11,11 @@ export default function addStickyControl() {
extend(DiscussionListItem.prototype, 'infoItems', function(items) {
const discussion = this.props.discussion;
if (discussion.isSticky()) {
if (discussion.isSticky() && !this.props.params.q) {
const startPost = discussion.startPost();
if (startPost) {
const excerpt = <span>{truncate(startPost.contentPlain(), 200)}</span>;
const excerpt = truncate(startPost.contentPlain(), 175);
items.add('excerpt', excerpt, -100);
}