mirror of
https://github.com/discourse/discourse.git
synced 2025-02-25 18:55:32 -06:00
Show pending posts count in modal when your posts are enqueued
This commit is contained in:
@@ -4,7 +4,8 @@ class NewPostResultSerializer < ApplicationSerializer
|
||||
attributes :action,
|
||||
:post,
|
||||
:errors,
|
||||
:success
|
||||
:success,
|
||||
:pending_count
|
||||
|
||||
def post
|
||||
post_serializer = PostSerializer.new(object.post, scope: scope, root: false)
|
||||
@@ -36,4 +37,12 @@ class NewPostResultSerializer < ApplicationSerializer
|
||||
object.action
|
||||
end
|
||||
|
||||
def pending_count
|
||||
object.pending_count
|
||||
end
|
||||
|
||||
def include_pending_count?
|
||||
pending_count.present?
|
||||
end
|
||||
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user