[gnome-shell/gbsneto/custom-icon-positions: 5/7] appDisplay: Move folder icons to where they're dropped
- From: Georges Basile Stavracas Neto <gbsneto src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-shell/gbsneto/custom-icon-positions: 5/7] appDisplay: Move folder icons to where they're dropped
- Date: Wed, 27 May 2020 18:54:28 +0000 (UTC)
commit 83fe35386dc1d34e934af800e384ae30d756f353
Author: Georges Basile Stavracas Neto <georges stavracas gmail com>
Date: Wed May 27 14:39:54 2020 -0300
appDisplay: Move folder icons to where they're dropped
https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1284
js/ui/appDisplay.js | 15 ++++++++++++---
1 file changed, 12 insertions(+), 3 deletions(-)
---
diff --git a/js/ui/appDisplay.js b/js/ui/appDisplay.js
index d2960c4ee3..d6c39adfe8 100644
--- a/js/ui/appDisplay.js
+++ b/js/ui/appDisplay.js
@@ -1130,10 +1130,19 @@ class AppDisplay extends BaseAppView {
targetPosition++;
let view = _getViewFromIcon(source);
- if (view === this)
- this.moveItem(source, targetPage, targetPosition);
- else
+ let movedItem = source;
+
+ // Remove from the folder
+ if (view !== this) {
+ const id = source.id;
+
view.removeApp(source.app);
+ this._redisplay();
+
+ movedItem = this._items.get(id);
+ }
+
+ this.moveItem(movedItem, targetPage, targetPosition);
if (this._currentDialog)
this._currentDialog.popdown();
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]