[gnome-software/wip/kalev/gnome-3-22: 40/96] trivial: Include related apps when getting the download size



commit 88625e63dc14d7b80160a1154006861c6e59c00e
Author: Richard Hughes <richard hughsie com>
Date:   Thu Jan 12 19:42:02 2017 +0000

    trivial: Include related apps when getting the download size

 src/gs-app.c |    6 ++++++
 1 files changed, 6 insertions(+), 0 deletions(-)
---
diff --git a/src/gs-app.c b/src/gs-app.c
index 311d1aa..222ae3b 100644
--- a/src/gs-app.c
+++ b/src/gs-app.c
@@ -2567,6 +2567,12 @@ gs_app_get_size_download (GsApp *app)
                        sz += gs_app_get_size_installed (app->runtime);
        }
 
+       /* add related apps */
+       for (guint i = 0; i < app->related->len; i++) {
+               GsApp *app_related = g_ptr_array_index (app->related, i);
+               sz += gs_app_get_size_download (app_related);
+       }
+
        return sz;
 }
 


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