Pārlūkot izejas kodu

fix: Show notification indicator badge only if there are unread notifications

version-14
Suraj Shetty pirms 2 gadiem
vecāks
revīzija
ed4412c55a
1 mainītis faili ar 2 papildinājumiem un 2 dzēšanām
  1. +2
    -2
      frappe/public/js/frappe/ui/notifications/notifications.js

+ 2
- 2
frappe/public/js/frappe/ui/notifications/notifications.js Parādīt failu

@@ -192,7 +192,7 @@ class NotificationsView extends BaseNotificationsView {
this.get_notifications_list(this.max_length).then(list => {
this.dropdown_items = list;
this.render_notifications_dropdown();
if (this.settings.seen == 0) {
if (this.settings.seen == 0 && this.dropdown_items.length > 0) {
this.toggle_notification_icon(false);
}
});
@@ -323,7 +323,7 @@ class NotificationsView extends BaseNotificationsView {

get_notifications_list(limit) {
return frappe.db.get_list('Notification Log', {
fields: ['*'],
fields: ['subject', "type", "document_type", "document_name", "creation", "from_user", "name"],
limit: limit,
order_by: 'creation desc'
});


Notiek ielāde…
Atcelt
Saglabāt