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 20373ba64e
commit da7cd2807f

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 = {};