[gnome-shell/wip/rstrode/rhel-7.9: 76/86] appDisplay: Keep popup open on refresh




commit a9673dd74c2326a1d3707059172b5294895c012d
Author: Ray Strode <rstrode redhat com>
Date:   Thu Jul 18 11:13:27 2019 -0400

    appDisplay: Keep popup open on refresh
    
    If the list of applications is refreshed we currently close
    the open app folder.
    
    This commit adds logic to reopen the app folder on reload.
    
    https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/628

 js/ui/appDisplay.js | 15 +++++++++++++++
 1 file changed, 15 insertions(+)
---
diff --git a/js/ui/appDisplay.js b/js/ui/appDisplay.js
index 6409a3de68..8def0897f4 100644
--- a/js/ui/appDisplay.js
+++ b/js/ui/appDisplay.js
@@ -471,6 +471,21 @@ var AllView = new Lang.Class({
         this.parent();
     },
 
+    _redisplay() {
+        let openFolderId = null;
+        if (this._displayingPopup && this._currentPopup)
+            openFolderId = this._currentPopup._source.id;
+
+        super._redisplay();
+
+        if (openFolderId) {
+            let [folderToReopen] = this.folderIcons.filter(folder => folder.id == openFolderId);
+
+            if (folderToReopen)
+                folderToReopen.open();
+        }
+    },
+
     _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.


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