mirror of
https://github.com/discourse/discourse.git
synced 2025-01-31 22:57:15 +08:00
FIX: shows filter if there's no notifications to show after filter
This commit is contained in:
parent
a51b8d9c66
commit
5285cbee62
|
@ -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") {
|
||||
|
|
|
@ -8,9 +8,10 @@
|
|||
</div>
|
||||
{{/if}}
|
||||
|
||||
{{#if hasNotifications}}
|
||||
{{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}}
|
||||
|
|
Loading…
Reference in New Issue
Block a user