mpris: Disallow media section on login screen

The 'gdm' user is not going to run a media player, so there is no
point in allowing the corresponding section on the login screen.

All other sections are already disabled, so this is the only reason why
we end up with the message list instead of only showing the calendar.

https://gitlab.gnome.org/GNOME/gnome-shell/issues/2241
This commit is contained in:
Florian Müllner 2020-02-20 16:40:04 +01:00 committed by Georges Basile Stavracas Neto
parent c773c8c162
commit d66f5ab3c6

View File

@ -251,6 +251,10 @@ class MediaSection extends MessageList.MessageListSection {
return !this.empty && Calendar.isToday(this._date); return !this.empty && Calendar.isToday(this._date);
} }
get allowed() {
return !Main.sessionMode.isGreeter;
}
_addPlayer(busName) { _addPlayer(busName) {
if (this._players.get(busName)) if (this._players.get(busName))
return; return;