GNOME Bugzilla – Bug 775799
Notification times get reset when I reboot
Last modified: 2017-02-27 19:05:14 UTC
Created attachment 341604 [details] screenshot I have a list of old notifications in the calendar drop-down. All the ones that are from a previous boot have the same time - I think the time when I last rebooted.
Yes, the time shown is the time when the message was added to the list, not when the notification was first received. It shouldn't be hard to change that, the format that is used to serialize notifications is luckily flexible enough to add additional properties ...
Created attachment 346833 [details] [review] messageTray: Add optional datetime parameter to notifications Since the last notification redesign, we've been showing the time a notification was received in the calendar drop-down. However as the time is in fact added by the NotificationSection, it is actually the time a notification was added to the list. Usually that difference is not significant, except when previously received notifications are restored on startup. In order to be able to address those cases, we need a time that is associated with the notification itself, so add a datetime property that defaults to the current time, but may be set from an optional parameter as well.
Created attachment 346834 [details] [review] notificationDaemon: Include timestamp in serialized notifications GNotifications are persistent until dismissed or withdrawn, including across restarts. As we show the time a notification was received in the calendar, we need to include that information when serializing the notification in order to be correct.
Created attachment 346835 [details] [review] telepathyClient: Update notification time from message As the telepathy integration picks up existing channels on startup, ChatNotifications are another case where the real time the message was received may be before the time it is picked up by the shell. While this is less of an annoyance than restored GNotifications, as it generally only affects restarts from the run dialog, it's an easy fix now ...
Review of attachment 346833 [details] [review]: lgtm
Review of attachment 346834 [details] [review]: ok
Review of attachment 346835 [details] [review]: ++
Attachment 346833 [details] pushed as 0569bb1 - messageTray: Add optional datetime parameter to notifications Attachment 346834 [details] pushed as 4e491b6 - notificationDaemon: Include timestamp in serialized notifications Attachment 346835 [details] pushed as c6f2282 - telepathyClient: Update notification time from message