[gnome-software/gnome-3-22] app row: Only show previous update version when we have the data



commit c8d0284ccf83abd44c7ca5ab98ead9967d956617
Author: Kalev Lember <klember redhat com>
Date:   Wed Jan 18 11:10:06 2017 +0100

    app row: Only show previous update version when we have the data
    
    When reviewing completed offline updates, we currently lack the data for
    the previous version that was installed. In that case, instead of
    showing identical 'from' and 'to' versions, e.g. '3.22.1-1.fc25 ->
    3.22.1-1.fc25', just show the 'to' version.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=774165

 src/gs-app-row.c |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)
---
diff --git a/src/gs-app-row.c b/src/gs-app-row.c
index c6cf4dc..db1f7e0 100644
--- a/src/gs-app-row.c
+++ b/src/gs-app-row.c
@@ -133,7 +133,8 @@ gs_app_row_format_version_update (GsApp *app)
                version_update = tmp;
 
        /* have both */
-       if (version_current != NULL && version_update != NULL) {
+       if (version_current != NULL && version_update != NULL &&
+           g_strcmp0 (version_current, version_update) != 0) {
                return g_strdup_printf ("%s ▶ %s",
                                        version_current,
                                        version_update);


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