[gnome-shell] appDisplay: Use _getCategories function instead of duplicating the code



commit c4fa052b033c954b77c969aa9caf42cebd3ebd47
Author: Jonas Dreßler <verdre v0yd nl>
Date:   Fri Nov 1 00:19:38 2019 +0100

    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

 js/ui/appDisplay.js | 5 +----
 1 file changed, 1 insertion(+), 4 deletions(-)
---
diff --git a/js/ui/appDisplay.js b/js/ui/appDisplay.js
index 3b70cd5c0e..8960f6fa8e 100644
--- a/js/ui/appDisplay.js
+++ b/js/ui/appDisplay.js
@@ -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;
 


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]