FIX: shows filter if there's no notifications to show after filter

This commit is contained in:
Joffrey JAFFEUX 2020-05-04 13:16:53 +02:00 committed by GitHub
parent a51b8d9c66
commit 5285cbee62
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 5 additions and 4 deletions

View File

@ -16,7 +16,7 @@ export default Controller.extend({
},
@discourseComputed("model.content.length", "filter")
hasNotifications(length, filter) {
hasFilteredNotifications(length, filter) {
if (filter === "read") {
return this.model.filterBy("read", true).length > 0;
} else if (filter === "unread") {

View File

@ -8,9 +8,10 @@
</div>
{{/if}}
{{#if hasNotifications}}
{{notifications-filter value=filter onChange=(action "filterNotifications")}}
<span class="user-notifications-filter-separator"></span>
{{notifications-filter value=filter onChange=(action "filterNotifications")}}
<span class="user-notifications-filter-separator"></span>
{{#if hasFilteredNotifications}}
{{user-notifications-large notifications=model filter=filter}}
{{conditional-loading-spinner condition=loading}}
{{else}}