From 302687b11af0012d6c91b15be2c9853f2fd403d3 Mon Sep 17 00:00:00 2001 From: Alexander Skvortsov Date: Mon, 1 Mar 2021 23:26:35 -0500 Subject: [PATCH] Use one instance of formatter extender --- extensions/mentions/extend.php | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/extensions/mentions/extend.php b/extensions/mentions/extend.php index a66a2f008..345e47907 100644 --- a/extensions/mentions/extend.php +++ b/extensions/mentions/extend.php @@ -32,7 +32,9 @@ return [ ->css(__DIR__.'/less/forum.less'), (new Extend\Formatter) - ->configure(ConfigureMentions::class), + ->configure(ConfigureMentions::class) + ->render(Formatter\FormatPostMentions::class) + ->render(Formatter\FormatUserMentions::class), (new Extend\Model(Post::class)) ->belongsToMany('mentionedBy', Post::class, 'post_mentions_post', 'mentions_post_id', 'post_id') @@ -75,8 +77,4 @@ return [ ->listen(Hidden::class, Listener\UpdateMentionsMetadataWhenInvisible::class) ->listen(Deleted::class, Listener\UpdateMentionsMetadataWhenInvisible::class) ->listen(ConfigurePostsQuery::class, Listener\AddFilterByMentions::class), - - (new Extend\Formatter()) - ->render(Formatter\FormatPostMentions::class) - ->render(Formatter\FormatUserMentions::class), ];