[gnome-shell/gbsneto/icon-grid-part1: 7/9] baseAppView: Remove unused BaseAppView methods
- From: Georges Basile Stavracas Neto <gbsneto src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-shell/gbsneto/icon-grid-part1: 7/9] baseAppView: Remove unused BaseAppView methods
- Date: Thu, 25 Jul 2019 15:13:06 +0000 (UTC)
commit 73b7a6560e31ba7f2ffb6f1af15a88fa6ad0659b
Author: Georges Basile Stavracas Neto <georges stavracas gmail com>
Date: Tue Jul 2 10:12:08 2019 -0300
baseAppView: Remove unused BaseAppView methods
Now that BaseAppView does not allow for subclasses to add
and remove items directly, the addItem() method can be
removed.
Equally, BaseAppView.hasItem() is now unused since it's
functionality is implicitly performed by the diff algorithm.
Remove BaseAppView.addItem() and BaseAppView.hasItem().
https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/645
js/ui/appDisplay.js | 13 -------------
1 file changed, 13 deletions(-)
---
diff --git a/js/ui/appDisplay.js b/js/ui/appDisplay.js
index 5030e1efa..9ea76f470 100644
--- a/js/ui/appDisplay.js
+++ b/js/ui/appDisplay.js
@@ -148,19 +148,6 @@ class BaseAppView {
return this._allItems;
}
- hasItem(id) {
- return this._items[id] !== undefined;
- }
-
- addItem(icon) {
- let id = icon.id;
- if (this.hasItem(id))
- throw new Error(`icon with id ${id} already added to view`);
-
- this._allItems.push(icon);
- this._items[id] = icon;
- }
-
_compareItems(a, b) {
return a.name.localeCompare(b.name);
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]