search: Port all search providers over to the async API
https://bugzilla.gnome.org/show_bug.cgi?id=675328
This commit is contained in:
@@ -151,10 +151,11 @@ const ContactSearchProvider = new Lang.Class({
|
||||
|
||||
_init: function() {
|
||||
this.parent(_("CONTACTS"));
|
||||
this.async = true;
|
||||
this._contactSys = Shell.ContactSystem.get_default();
|
||||
},
|
||||
|
||||
getResultMetas: function(ids) {
|
||||
getResultMetasAsync: function(ids, callback) {
|
||||
let metas = [];
|
||||
for (let i = 0; i < ids.length; i++) {
|
||||
let contact = new Contact(ids[i]);
|
||||
@@ -165,15 +166,15 @@ const ContactSearchProvider = new Lang.Class({
|
||||
}
|
||||
});
|
||||
}
|
||||
return metas;
|
||||
callback(metas);
|
||||
},
|
||||
|
||||
getInitialResultSet: function(terms) {
|
||||
return this._contactSys.initial_search(terms);
|
||||
getInitialResultSetAsync: function(terms) {
|
||||
this.searchSystem.pushResults(this, this._contactSys.initial_search(terms));
|
||||
},
|
||||
|
||||
getSubsearchResultSet: function(previousResults, terms) {
|
||||
return this._contactSys.subsearch(previousResults, terms);
|
||||
getSubsearchResultSetAsync: function(previousResults, terms) {
|
||||
this.searchSystem.pushResults(this, this._contactSys.subsearch(previousResults, terms));
|
||||
},
|
||||
|
||||
createResultActor: function(resultMeta, terms) {
|
||||
|
Reference in New Issue
Block a user