From e89d55b0430f151eadd2283a61248503e22b2b72 Mon Sep 17 00:00:00 2001 From: Alexander Vanhee <160625516+AlexanderVanhee@users.noreply.github.com> Date: Thu, 25 Jun 2026 12:44:46 +0200 Subject: [PATCH] Show just the version number in update row if it hasn't changed --- src/bz-updates-card.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/bz-updates-card.c b/src/bz-updates-card.c index b141e294..585a3579 100644 --- a/src/bz-updates-card.c +++ b/src/bz-updates-card.c @@ -114,6 +114,7 @@ build_app_row (BzEntry *entry, g_autoptr (GListModel) history = NULL; g_autofree char *installed_ver = NULL; const char *new_ver = NULL; // This will probably the same as the installed version if using cache... + g_autofree char *subtitle = NULL; row = ADW_ACTION_ROW (adw_action_row_new ()); adw_preferences_row_set_title (ADW_PREFERENCES_ROW (row), @@ -143,9 +144,12 @@ build_app_row (BzEntry *entry, g_autoptr (BzRelease) first = g_list_model_get_item (history, 0); new_ver = bz_release_get_version (first); - if (new_ver != NULL && g_strcmp0 (installed_ver, new_ver) != 0) + if (new_ver != NULL) { - g_autofree char *subtitle = g_strdup_printf ("%s → %s", installed_ver, new_ver); + if (g_strcmp0 (installed_ver, new_ver) != 0) + subtitle = g_strdup_printf ("%s → %s", installed_ver, new_ver); + else + subtitle = g_strdup (new_ver); adw_action_row_set_subtitle (row, subtitle); } }