appDisplay: Redisplay folders before AppDisplay

When filtering out the app icons, AppDisplay calls FolderIcon.getAppIds(),
which then calls FolderView.getAllItems(). This last function reads the
already added app icons inside the given folder, and return their app ids.

So far, so good.

When the GSettings backing a folder changes, FolderIcon emits 'apps-changed'
to notify AppDisplay that the folder changed.

Cool.

When AppDisplay receives this signal, it first recreates its own icons, then
updates the folders, and finally hides the icons that are inside folders.

This series of events is unfortunate. Future patches will need the folder
to be updated *before* AppDisplay updates its own icons.

Update folder icons before chaining up to BaseAppView._redisplay().

https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1271
This commit is contained in:
Georges Basile Stavracas Neto 2020-05-19 17:32:22 -03:00
parent 4c2c1297be
commit fb4a4ca4a2

View File

@ -430,11 +430,11 @@ class AppDisplay extends BaseAppView {
} }
_redisplay() { _redisplay() {
super._redisplay();
this._folderIcons.forEach(icon => { this._folderIcons.forEach(icon => {
icon.view._redisplay(); icon.view._redisplay();
}); });
super._redisplay();
this._refilterApps(); this._refilterApps();
} }