messageList: Remove setDate() method

Since the events section has been removed and visibility no longer
depends on the date, it's not used by anything anymore.

https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1282
This commit is contained in:
Florian Müllner 2018-12-18 11:26:30 +01:00
parent 8451df977c
commit 771050f4d7
3 changed files with 0 additions and 15 deletions

View File

@ -1029,8 +1029,4 @@ class CalendarMessageList extends St.Widget {
let canClear = sections.some(s => s.canClear && s.visible); let canClear = sections.some(s => s.canClear && s.visible);
this._clearButton.reactive = canClear; this._clearButton.reactive = canClear;
} }
setDate(date) {
this._sectionList.get_children().forEach(s => s.setDate(date));
}
}); });

View File

@ -632,7 +632,6 @@ class DateMenuButton extends PanelMenu.Button {
this._calendar.connect('selected-date-changed', (_calendar, datetime) => { this._calendar.connect('selected-date-changed', (_calendar, datetime) => {
let date = _gDateTimeToDate(datetime); let date = _gDateTimeToDate(datetime);
layout.frozen = !_isToday(date); layout.frozen = !_isToday(date);
this._messageList.setDate(date);
}); });
this.menu.connect('open-state-changed', (menu, isOpen) => { this.menu.connect('open-state-changed', (menu, isOpen) => {
@ -641,7 +640,6 @@ class DateMenuButton extends PanelMenu.Button {
let now = new Date(); let now = new Date();
this._calendar.setDate(now); this._calendar.setDate(now);
this._date.setDate(now); this._date.setDate(now);
this._messageList.setDate(now);
} }
}); });

View File

@ -4,7 +4,6 @@ const { Atk, Clutter, Gio, GLib,
const Main = imports.ui.main; const Main = imports.ui.main;
const MessageTray = imports.ui.messageTray; const MessageTray = imports.ui.messageTray;
const Calendar = imports.ui.calendar;
const Util = imports.misc.util; const Util = imports.misc.util;
var MESSAGE_ANIMATION_TIME = 100; var MESSAGE_ANIMATION_TIME = 100;
@ -572,7 +571,6 @@ var MessageListSection = GObject.registerClass({
Main.sessionMode.disconnect(id); Main.sessionMode.disconnect(id);
}); });
this._date = new Date();
this._empty = true; this._empty = true;
this._canClear = false; this._canClear = false;
this._sync(); this._sync();
@ -598,13 +596,6 @@ var MessageListSection = GObject.registerClass({
return true; return true;
} }
setDate(date) {
if (Calendar.sameDay(date, this._date))
return;
this._date = date;
this._sync();
}
addMessage(message, animate) { addMessage(message, animate) {
this.addMessageAtIndex(message, -1, animate); this.addMessageAtIndex(message, -1, animate);
} }