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
This commit is contained in:
Ray Strode 2019-07-18 11:13:27 -04:00 committed by Ray Strode
parent 0ee13672ee
commit cebb6d40df

View File

@ -330,6 +330,21 @@ var AllView = class AllView extends BaseAppView {
super.removeAll(); super.removeAll();
} }
_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) { _itemNameChanged(item) {
// If an item's name changed, we can pluck it out of where it's // 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. // supposed to be and reinsert it where it's sorted.