calendar: Use relative times for notification timestamps
For notifications in the message list, it is usually less relevant when exactly it occurred, but how long ago. So rather than showing the exact time and expecting the user to figuring out the timespan themselves, change the format to something human readable. https://bugzilla.gnome.org/show_bug.cgi?id=775763
This commit is contained in:
@ -957,9 +957,12 @@ const NotificationSection = new Lang.Class({
|
||||
},
|
||||
|
||||
_createTimeLabel: function(datetime) {
|
||||
let label = Util.createTimeLabel(datetime);
|
||||
label.style_class = 'event-time',
|
||||
label.x_align = Clutter.ActorAlign.START;
|
||||
let label = new St.Label({ style_class: 'event-time',
|
||||
x_align: Clutter.ActorAlign.START });
|
||||
label.connect('notify::mapped', () => {
|
||||
if (label.mapped)
|
||||
label.text = Util.formatTimeSpan(datetime);
|
||||
});
|
||||
return label;
|
||||
},
|
||||
|
||||
|
Reference in New Issue
Block a user