[gnome-shell/gbsneto/icon-grid-part1: 16/19] baseAppView: Remove _updateGrid()
- From: Georges Basile Stavracas Neto <gbsneto src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-shell/gbsneto/icon-grid-part1: 16/19] baseAppView: Remove _updateGrid()
- Date: Mon, 5 Aug 2019 20:47:18 +0000 (UTC)
commit a0956f1f913db43adb1e6dba8a7587c6bdc88ac5
Author: Georges Basile Stavracas Neto <georges stavracas gmail com>
Date: Mon Aug 5 17:37:30 2019 -0300
baseAppView: Remove _updateGrid()
Following the past few patches, now that _redisplay()
takes care of the majority of the loading routines of
the views, _updateGrid() can be appended to it.
Append the contents of _upgradeGrid() to _redisplay(),
and remove _updateGrid().
https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/645
js/ui/appDisplay.js | 31 ++++++++++++++-----------------
1 file changed, 14 insertions(+), 17 deletions(-)
---
diff --git a/js/ui/appDisplay.js b/js/ui/appDisplay.js
index d525c243b..dc45e9ec3 100644
--- a/js/ui/appDisplay.js
+++ b/js/ui/appDisplay.js
@@ -141,7 +141,18 @@ class BaseAppView {
this._items[icon.id] = icon;
});
- this._updateGrid();
+ // Update this._grid items
+ this._allItems.sort(this._compareItems);
+
+ this._allItems.forEach((item, index) => {
+ // Don't readd already added items
+ if (item.actor.get_parent())
+ return;
+
+ this._grid.addItem(item, index);
+ });
+
+ this.emit('view-loaded');
}
getAllItems() {
@@ -165,20 +176,6 @@ class BaseAppView {
return a.name.localeCompare(b.name);
}
- _updateGrid() {
- this._allItems.sort(this._compareItems);
-
- this._allItems.forEach((item, index) => {
- // Don't readd already added items
- if (item.actor.get_parent())
- return;
-
- this._grid.addItem(item, index);
- });
-
- this.emit('view-loaded');
- }
-
_selectAppInternal(id) {
if (this._items[id])
this._items[id].actor.navigate_focus(null, St.DirectionType.TAB_FORWARD, false);
@@ -431,8 +428,8 @@ var AllView = class AllView extends BaseAppView {
return newApps;
}
- _updateGrid() {
- super._updateGrid();
+ _redisplay() {
+ super._redisplay();
this._refilterApps();
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]