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



commit b236636f7a16319cf89704bca988cfd99f891136
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 1fd0409..0d641cd 100644
--- a/src/gs-app-row.c
+++ b/src/gs-app-row.c
@@ -135,7 +135,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]