[gnome-shell/gbsneto/icon-grid-dnd: 32/41] allView, folderView: Save order after moving icon



commit 2484641226383dfa9398bf795ce5509996e89393
Author: Georges Basile Stavracas Neto <georges stavracas gmail com>
Date:   Tue Jul 2 17:47:58 2019 -0300

    allView, folderView: Save order after moving icon
    
    WIP: commit message
    
    https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/603

 js/ui/appDisplay.js | 12 ++++++++++++
 1 file changed, 12 insertions(+)
---
diff --git a/js/ui/appDisplay.js b/js/ui/appDisplay.js
index 245982a04..031ed6fc4 100644
--- a/js/ui/appDisplay.js
+++ b/js/ui/appDisplay.js
@@ -506,6 +506,11 @@ var AllView = class AllView extends BaseAppView {
         this._saveGridLayout();
     }
 
+    moveItem(item, newPosition) {
+        super.moveItem(item, newPosition);
+        this._saveGridLayout();
+    }
+
     // Overridden from BaseAppView
     animate(animationDirection, onComplete) {
         this._scrollView.reactive = false;
@@ -1364,6 +1369,13 @@ var FolderView = class FolderView extends BaseAppView {
         return apps;
     }
 
+    moveItem(item, newPosition) {
+        super.moveItem(item, newPosition);
+
+        let appIds = this._allItems.map(icon => icon.id);
+        this._folder.set_strv('apps', appIds);
+    }
+
     get folderIcon() {
         return this._folderIcon;
     }


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]