[gnome-shell/gbsneto/custom-icon-positions: 17/17] appDisplay: Ensure icons always are at the correct position
- From: Georges Basile Stavracas Neto <gbsneto src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-shell/gbsneto/custom-icon-positions: 17/17] appDisplay: Ensure icons always are at the correct position
- Date: Tue, 23 Jun 2020 17:47:26 +0000 (UTC)
commit 5fe41b2b233176696c2f2877045cf7a0cd139a33
Author: Georges Basile Stavracas Neto <georges stavracas gmail com>
Date: Tue Jun 23 12:18:56 2020 -0300
appDisplay: Ensure icons always are at the correct position
When redisplaying, we currently only remove and add icons, but
never adjust the position of already added icons. If the icon
position changed, it wouldn't be reflected on the icon grid.
Make sure to move already added icons.
https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1284
js/ui/appDisplay.js | 7 +++++--
1 file changed, 5 insertions(+), 2 deletions(-)
---
diff --git a/js/ui/appDisplay.js b/js/ui/appDisplay.js
index cfc6209193..19602e36b1 100644
--- a/js/ui/appDisplay.js
+++ b/js/ui/appDisplay.js
@@ -325,9 +325,12 @@ var BaseAppView = GObject.registerClass({
return [page, position];
};
- addedApps.forEach(icon => {
+ newApps.forEach(icon => {
const [page, position] = getItemPosition(icon);
- this._addItem(icon, page, position);
+ if (addedApps.includes(icon))
+ this._addItem(icon, page, position);
+ else
+ this.moveItem(icon, page, position);
});
this._viewIsReady = true;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]