From ff55cf017e5f495d6ab7912342b55e2d13ee2737 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Florian=20M=C3=BCllner?= Date: Tue, 18 Dec 2018 11:16:24 +0100 Subject: [PATCH] calendar: Don't restrict section visibility by date The idea behind hiding the notifications and media section on days other than today was that they represent present activity together with today's events, in contrast to past and future events from other days. After events were moved out of the message list, that behavior is no longer useful: We just guarantee that the left-hand side of the calendar will always be empty when browsing the calendar. Adjust to that by removing the limitation by date. https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1282 --- js/ui/calendar.js | 4 ---- js/ui/mpris.js | 5 ----- 2 files changed, 9 deletions(-) diff --git a/js/ui/calendar.js b/js/ui/calendar.js index e048cd086..7eb451916 100644 --- a/js/ui/calendar.js +++ b/js/ui/calendar.js @@ -883,10 +883,6 @@ class NotificationSection extends MessageList.MessageListSection { }); super.vfunc_map(); } - - _shouldShow() { - return !this.empty && isToday(this._date); - } }); var Placeholder = GObject.registerClass( diff --git a/js/ui/mpris.js b/js/ui/mpris.js index 23fca91b1..3650c577a 100644 --- a/js/ui/mpris.js +++ b/js/ui/mpris.js @@ -2,7 +2,6 @@ const { Gio, GObject, Shell, St } = imports.gi; const Signals = imports.signals; -const Calendar = imports.ui.calendar; const Main = imports.ui.main; const MessageList = imports.ui.messageList; @@ -252,10 +251,6 @@ class MediaSection extends MessageList.MessageListSection { this._onProxyReady.bind(this)); } - _shouldShow() { - return !this.empty && Calendar.isToday(this._date); - } - get allowed() { return !Main.sessionMode.isGreeter; }