Commit 56ee7fe4 authored by Richard Hughes's avatar Richard Hughes
Browse files

Only show maximum 3 update descriptions if no previous releases are found

If an app switches from NEWS to AppStream <release> tags we don't want to show
multiple *years* of release notes on the next flatpak update.

As we can't know the current installed version, just do something more sane
than showing everything.
parent 8d5aa37e
......@@ -473,6 +473,11 @@ gs_appstream_refine_app_updates (GsPlugin *plugin,
if (g_hash_table_lookup (installed, version) != NULL)
continue;
/* limit this to three versions backwards if there has never
* been a detected installed version */
if (g_hash_table_size (installed) == 0 && i >= 3)
break;
/* use the 'worst' urgency, e.g. critical over enhancement */
urgency_tmp = as_urgency_kind_from_string (xb_node_get_attr (release, "urgency"));
if (urgency_tmp > urgency_best)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment