diff --git a/js/ui/appDisplay.js b/js/ui/appDisplay.js index 5c8d05bb2..9ad947fbc 100644 --- a/js/ui/appDisplay.js +++ b/js/ui/appDisplay.js @@ -151,13 +151,7 @@ class BaseAppView { return this._allItems; } - _compareItems(a, b) { - return a.name.localeCompare(b.name); - } - _loadGrid() { - this._allItems.sort(this._compareItems); - this._allItems.forEach((item, index) => { // Don't readd already added items if (item.actor.get_parent()) @@ -349,17 +343,6 @@ var AllView = class AllView extends BaseAppView { this._nEventBlockerInhibits = 0; } - _itemNameChanged(item) { - // If an item's name changed, we can pluck it out of where it's - // supposed to be and reinsert it where it's sorted. - let oldIdx = this._allItems.indexOf(item); - this._allItems.splice(oldIdx, 1); - let newIdx = Util.insertSorted(this._allItems, item, this._compareItems); - - this._grid.removeItem(item); - this._grid.addItem(item, newIdx); - } - _refilterApps() { let filteredApps = this._allItems.filter(icon => !icon.actor.visible); @@ -412,7 +395,6 @@ var AllView = class AllView extends BaseAppView { let icon = this._items[id]; if (!icon) { icon = new FolderIcon(id, path, this); - icon.connect('name-changed', this._itemNameChanged.bind(this)); icon.connect('apps-changed', this._redisplay.bind(this)); } newApps.push(icon); @@ -821,11 +803,6 @@ var FrequentView = class FrequentView extends BaseAppView { return this._usage.get_most_used().length >= MIN_FREQUENT_APPS_COUNT; } - _compareItems() { - // The FrequentView does not need to be sorted alphabetically - return 0; - } - _loadApps() { let apps = []; let mostUsed = this._usage.get_most_used();