mirror of
https://github.com/discourse/discourse.git
synced 2024-11-23 15:52:12 +08:00
don't alert for inbox count of 0
This commit is contained in:
parent
bf650de7be
commit
50a63a491c
|
@ -1,4 +1,5 @@
|
|||
const INVITED_TYPE = 8;
|
||||
const GROUP_SUMMARY_TYPE = 16;
|
||||
|
||||
export default Ember.Component.extend({
|
||||
tagName: 'li',
|
||||
|
@ -69,7 +70,7 @@ export default Ember.Component.extend({
|
|||
const description = this.get('description');
|
||||
const username = notification.get('data.display_username');
|
||||
var text;
|
||||
if (notification.get('data.inbox_count')) {
|
||||
if (notification.get('notification_type') === GROUP_SUMMARY_TYPE) {
|
||||
const count = notification.get('data.inbox_count');
|
||||
const group_name = notification.get('data.group_name');
|
||||
text = I18n.t(this.get('scope'), {count, group_name});
|
||||
|
|
|
@ -172,7 +172,7 @@ class PostAlerter
|
|||
.pluck(:group_id).first
|
||||
|
||||
stat = stats.find{|s| s[:group_id] == group_id}
|
||||
return unless stat
|
||||
return unless stat && stat[:inbox_count] > 0
|
||||
|
||||
notification_type = Notification.types[:group_message_summary]
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user