search: Cancel search provider operations on clear

Ensure that the search provider operations (just getResultMetas requests
in the current implementation) in progress are properly cancelled when we
clear the UI, otherwise returned results might still be added when not
needed.

This is triggered for each provider by the SearchResults reset.

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/205
This commit is contained in:
Marco Trevisan (Treviño) 2018-08-23 18:14:38 +02:00 committed by Florian Müllner
parent 0fe5a3c0c4
commit c47a740c83

View File

@ -192,6 +192,7 @@ var SearchResultsBase = new Lang.Class({
},
clear() {
this._cancellable.cancel();
for (let resultId in this._resultDisplays)
this._resultDisplays[resultId].actor.destroy();
this._resultDisplays = {};