appDisplay: Use _getCategories function instead of duplicating the code
We already have a function which gets the categories of an app and handles the null-return case, use it. https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/799
This commit is contained in:
parent
f3eeb94c90
commit
c4fa052b03
@ -102,10 +102,7 @@ function _findBestFolderName(apps) {
|
||||
let commonCategories = [];
|
||||
|
||||
appInfos.reduce((categories, appInfo) => {
|
||||
const appCategories = appInfo.get_categories();
|
||||
if (!appCategories)
|
||||
return categories;
|
||||
for (let category of appCategories.split(';')) {
|
||||
for (let category of _getCategories(appInfo)) {
|
||||
if (!(category in categoryCounter))
|
||||
categoryCounter[category] = 0;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user