[gnome-shell] messageList: Remove setDate() method
- From: Florian Müllner <fmuellner src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-shell] messageList: Remove setDate() method
- Date: Fri, 5 Jun 2020 23:11:18 +0000 (UTC)
commit 771050f4d789b93fa08729e4f452f8f834397182
Author: Florian Müllner <fmuellner gnome org>
Date: Tue Dec 18 11:26:30 2018 +0100
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
js/ui/calendar.js | 4 ----
js/ui/dateMenu.js | 2 --
js/ui/messageList.js | 9 ---------
3 files changed, 15 deletions(-)
---
diff --git a/js/ui/calendar.js b/js/ui/calendar.js
index ef3a282404..6a5f024f71 100644
--- a/js/ui/calendar.js
+++ b/js/ui/calendar.js
@@ -1029,8 +1029,4 @@ class CalendarMessageList extends St.Widget {
let canClear = sections.some(s => s.canClear && s.visible);
this._clearButton.reactive = canClear;
}
-
- setDate(date) {
- this._sectionList.get_children().forEach(s => s.setDate(date));
- }
});
diff --git a/js/ui/dateMenu.js b/js/ui/dateMenu.js
index 681968dc11..a98b5eec59 100644
--- a/js/ui/dateMenu.js
+++ b/js/ui/dateMenu.js
@@ -632,7 +632,6 @@ class DateMenuButton extends PanelMenu.Button {
this._calendar.connect('selected-date-changed', (_calendar, datetime) => {
let date = _gDateTimeToDate(datetime);
layout.frozen = !_isToday(date);
- this._messageList.setDate(date);
});
this.menu.connect('open-state-changed', (menu, isOpen) => {
@@ -641,7 +640,6 @@ class DateMenuButton extends PanelMenu.Button {
let now = new Date();
this._calendar.setDate(now);
this._date.setDate(now);
- this._messageList.setDate(now);
}
});
diff --git a/js/ui/messageList.js b/js/ui/messageList.js
index fb94767178..a79f87bb4e 100644
--- a/js/ui/messageList.js
+++ b/js/ui/messageList.js
@@ -4,7 +4,6 @@ const { Atk, Clutter, Gio, GLib,
const Main = imports.ui.main;
const MessageTray = imports.ui.messageTray;
-const Calendar = imports.ui.calendar;
const Util = imports.misc.util;
var MESSAGE_ANIMATION_TIME = 100;
@@ -572,7 +571,6 @@ var MessageListSection = GObject.registerClass({
Main.sessionMode.disconnect(id);
});
- this._date = new Date();
this._empty = true;
this._canClear = false;
this._sync();
@@ -598,13 +596,6 @@ var MessageListSection = GObject.registerClass({
return true;
}
- setDate(date) {
- if (Calendar.sameDay(date, this._date))
- return;
- this._date = date;
- this._sync();
- }
-
addMessage(message, animate) {
this.addMessageAtIndex(message, -1, animate);
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]