Fix syntax error in previous patch
Also some style/logic cleanups pointed out by Marina.
This commit is contained in:
parent
5416f53351
commit
36775c9a58
@ -345,7 +345,7 @@ AppDisplay.prototype = {
|
||||
}
|
||||
},
|
||||
|
||||
addApp: function(appId) {
|
||||
_addApp: function(appId) {
|
||||
let appInfo = Gio.DesktopAppInfo.new(appId);
|
||||
if (appInfo != null) {
|
||||
this._allItems[appId] = appInfo;
|
||||
@ -477,13 +477,11 @@ AppDisplay.prototype = {
|
||||
|
||||
// we expect this._appCategories.hasOwnProperty(itemInfo.get_id()) to always be true here
|
||||
let categories = this._appCategories[itemInfo.get_id()];
|
||||
if (categories) {
|
||||
for (let i = 0; i < categories.length; i++) {
|
||||
let category = categories[i].toLowerCase();
|
||||
if (category.indexOf(search) >= 0)
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
return false;
|
||||
},
|
||||
|
Loading…
x
Reference in New Issue
Block a user