DEV: Refactor messages code to use `user.groupsWithMessages` function (#19189)

Simplifies the template since we have one less conditional and one less
level of nesting
This commit is contained in:
Alan Guo Xiang Tan 2022-11-25 11:23:50 +08:00 committed by GitHub
parent bbcb69461f
commit 20715cd7f0
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 22 additions and 24 deletions

View File

@ -54,8 +54,7 @@
</li>
{{/if}}
{{#each this.model.groups as |group|}}
{{#if group.has_messages}}
{{#each this.model.groupsWithMessages as |group|}}
<li>
<LinkTo @route="userPrivateMessages.group" @model={{group.name}}>
{{d-icon "users"}}
@ -84,7 +83,6 @@
</LinkTo>
</li>
{{/if}}
{{/if}}
{{/each}}
{{#if this.pmTaggingEnabled}}