Fixed subscriber count not showing for scheduled email-only posts

No ref
This commit is contained in:
Sanne de Vries 2022-05-19 11:23:45 +02:00
parent 0cddb3ccb9
commit e09f41716b
2 changed files with 17 additions and 12 deletions

View File

@ -40,6 +40,7 @@
{{else if this.isComplete}}
<EditorLabs::Modals::PublishFlow::Complete
@publishOptions={{@data.publishOptions}}
@recipientType={{this.recipientType}}
@postCount={{this.postCount}}
@close={{@close}}
/>

View File

@ -40,21 +40,25 @@
Your post
{{if post.isScheduled "will be" "was"}}
sent to
{{#if post.isScheduled}}
{{#let (members-count-fetcher query=(hash filter=post.fullRecipientFilter)) as |countFetcher|}}
{{#if @publishOptions.onlyDefaultNewsletter}}
<strong>{{gh-pluralize post.email.emailCount "subscribers"}}</strong>
{{else}}
<strong>{{gh-pluralize post.email.emailCount "subscriber"}}</strong> of <strong>{{@publishOptions.post.newsletter.name}}</strong>
{{/if}}
{{/let}}
{{else}}
{{#let (members-count-fetcher query=(hash filter=post.fullRecipientFilter)) as |countFetcher|}}
<strong>
{{if (eq @recipientType "all") "all"}}
{{countFetcher.count}}
{{!-- @recipientType = none/free/paid/all/specific --}}
{{if (not-eq @recipientType "all") @recipientType}}
</strong>
{{#if @publishOptions.onlyDefaultNewsletter}}
<strong>{{gh-pluralize post.email.emailCount "subscribers"}}</strong>
<strong>{{gh-pluralize countFetcher.count "subscriber" without-count=true}}</strong>
{{else}}
<strong>{{gh-pluralize post.email.emailCount "subscriber"}}</strong> of <strong>{{@publishOptions.post.newsletter.name}}</strong>
<strong>{{gh-pluralize countFetcher.count "subscriber" without-count=true}}</strong>
of <strong>{{@publishOptions.newsletter.name}}</strong>,
{{/if}}
{{/if}}
{{/let}}
{{#let (moment-site-tz post.publishedAtUTC) as |publishedAt|}}
on