mirror of
https://github.com/flarum/core.git
synced 2025-08-02 14:37:49 +02:00
Only show reply list if there are replies not adjacent
This commit is contained in:
@@ -15,9 +15,16 @@ export default function mentionedByList() {
|
|||||||
});
|
});
|
||||||
|
|
||||||
extend(CommentPost.prototype, 'footerItems', function(items) {
|
extend(CommentPost.prototype, 'footerItems', function(items) {
|
||||||
var replies = this.props.post.mentionedBy();
|
var post = this.props.post;
|
||||||
|
var replies = post.mentionedBy();
|
||||||
if (replies && replies.length) {
|
if (replies && replies.length) {
|
||||||
|
|
||||||
|
// If there is only one reply, and it's adjacent to this post, we don't
|
||||||
|
// really need to show the list.
|
||||||
|
if (replies.length === 1 && replies[0].number() == post.number() + 1) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
var hidePreview = () => {
|
var hidePreview = () => {
|
||||||
this.$('.mentioned-by-preview').removeClass('in').one('transitionend', function() { $(this).hide(); });
|
this.$('.mentioned-by-preview').removeClass('in').one('transitionend', function() { $(this).hide(); });
|
||||||
};
|
};
|
||||||
|
Reference in New Issue
Block a user