[gnome-shell] unlockDialog: Only show count for multiple notifications
- From: Georges Basile Stavracas Neto <gbsneto src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-shell] unlockDialog: Only show count for multiple notifications
- Date: Thu, 13 Feb 2020 20:05:11 +0000 (UTC)
commit ccc64e2621d6d2dc3dda16889ebb3d48a5b21b42
Author: Florian Müllner <fmuellner gnome org>
Date: Thu Feb 13 19:06:51 2020 +0100
unlockDialog: Only show count for multiple notifications
In the common case where we only have a single unread notification
from a particular app, the count doesn't add useful information.
Reduce clutter a bit by only showing the notification count if we
have at least two.
https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/997
js/ui/unlockDialog.js | 2 ++
1 file changed, 2 insertions(+)
---
diff --git a/js/ui/unlockDialog.js b/js/ui/unlockDialog.js
index 41d0e08cc6..0ca62430cc 100644
--- a/js/ui/unlockDialog.js
+++ b/js/ui/unlockDialog.js
@@ -99,6 +99,7 @@ var NotificationsBox = GObject.registerClass({
let count = source.unseenCount;
let countLabel = new St.Label({
text: `${count}`,
+ visible: count > 1,
style_class: 'unlock-dialog-notification-count-text',
});
textBox.add(countLabel);
@@ -262,6 +263,7 @@ var NotificationsBox = GObject.registerClass({
} else {
let count = source.unseenCount;
obj.countLabel.text = `${count}`;
+ obj.countLabel.visible = count > 1;
}
obj.sourceBox.visible = obj.visible && (source.unseenCount > 0);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]