Blame SOURCES/gs-updates-page-keep-showing-installing-apps.patch

90eaf5
diff -up gnome-software-3.36.1/lib/gs-plugin.c.1888404 gnome-software-3.36.1/lib/gs-plugin.c
90eaf5
--- gnome-software-3.36.1/lib/gs-plugin.c.1888404	2021-05-24 13:50:34.302612057 +0200
90eaf5
+++ gnome-software-3.36.1/lib/gs-plugin.c	2021-05-24 13:50:39.160609728 +0200
90eaf5
@@ -1398,6 +1398,44 @@ gs_plugin_cache_lookup (GsPlugin *plugin
90eaf5
 }
90eaf5
 
90eaf5
 /**
90eaf5
+ * gs_plugin_cache_lookup_by_state:
90eaf5
+ * @plugin: a #GsPlugin
90eaf5
+ * @list: a #GsAppList to add applications to
90eaf5
+ * @state: a #AsAppState
90eaf5
+ *
90eaf5
+ * Adds each cached #GsApp with state @state into the @list.
90eaf5
+ * When the state is %AS_APP_STATE_UNKNOWN, then adds all
90eaf5
+ * cached applications.
90eaf5
+ *
90eaf5
+ * Since: 3.36.1-8
90eaf5
+ **/
90eaf5
+void
90eaf5
+gs_plugin_cache_lookup_by_state (GsPlugin *plugin,
90eaf5
+				 GsAppList *list,
90eaf5
+				 AsAppState state)
90eaf5
+{
90eaf5
+	GsPluginPrivate *priv;
90eaf5
+	GHashTableIter iter;
90eaf5
+	gpointer value;
90eaf5
+	g_autoptr(GMutexLocker) locker = NULL;
90eaf5
+
90eaf5
+	g_return_if_fail (GS_IS_PLUGIN (plugin));
90eaf5
+	g_return_if_fail (GS_IS_APP_LIST (list));
90eaf5
+
90eaf5
+	priv = gs_plugin_get_instance_private (plugin);
90eaf5
+	locker = g_mutex_locker_new (&priv->cache_mutex);
90eaf5
+
90eaf5
+	g_hash_table_iter_init (&iter, priv->cache);
90eaf5
+	while (g_hash_table_iter_next (&iter, NULL, &value)) {
90eaf5
+		GsApp *app = value;
90eaf5
+
90eaf5
+		if (state == AS_APP_STATE_UNKNOWN ||
90eaf5
+		    state == gs_app_get_state (app))
90eaf5
+			gs_app_list_add (list, app);
90eaf5
+	}
90eaf5
+}
90eaf5
+
90eaf5
+/**
90eaf5
  * gs_plugin_cache_remove:
90eaf5
  * @plugin: a #GsPlugin
90eaf5
  * @key: a key which matches
90eaf5
diff -up gnome-software-3.36.1/lib/gs-plugin.h.1888404 gnome-software-3.36.1/lib/gs-plugin.h
90eaf5
--- gnome-software-3.36.1/lib/gs-plugin.h.1888404	2021-05-24 13:50:34.302612057 +0200
90eaf5
+++ gnome-software-3.36.1/lib/gs-plugin.h	2021-05-24 13:50:39.160609728 +0200
90eaf5
@@ -102,6 +102,9 @@ gboolean	 gs_plugin_check_distro_id		(Gs
90eaf5
 							 const gchar	*distro_id);
90eaf5
 GsApp		*gs_plugin_cache_lookup			(GsPlugin	*plugin,
90eaf5
 							 const gchar	*key);
90eaf5
+void		 gs_plugin_cache_lookup_by_state	(GsPlugin	*plugin,
90eaf5
+							 GsAppList	*list,
90eaf5
+							 AsAppState	 state);
90eaf5
 void		 gs_plugin_cache_add			(GsPlugin	*plugin,
90eaf5
 							 const gchar	*key,
90eaf5
 							 GsApp		*app);
90eaf5
diff -up gnome-software-3.36.1/lib/gs-plugin-loader.c.1888404 gnome-software-3.36.1/lib/gs-plugin-loader.c
90eaf5
--- gnome-software-3.36.1/lib/gs-plugin-loader.c.1888404	2021-05-24 13:50:34.302612057 +0200
90eaf5
+++ gnome-software-3.36.1/lib/gs-plugin-loader.c	2021-05-24 13:50:39.159609728 +0200
90eaf5
@@ -1273,7 +1273,7 @@ static gboolean
90eaf5
 gs_plugin_loader_app_is_valid_updatable (GsApp *app, gpointer user_data)
90eaf5
 {
90eaf5
 	return gs_plugin_loader_app_is_valid (app, user_data) &&
90eaf5
-		gs_app_is_updatable (app);
90eaf5
+		(gs_app_is_updatable (app) || gs_app_get_state (app) == AS_APP_STATE_INSTALLING);
90eaf5
 }
90eaf5
 
90eaf5
 static gboolean
90eaf5
diff -up gnome-software-3.36.1/plugins/flatpak/gs-plugin-flatpak.c.1888404 gnome-software-3.36.1/plugins/flatpak/gs-plugin-flatpak.c
90eaf5
--- gnome-software-3.36.1/plugins/flatpak/gs-plugin-flatpak.c.1888404	2021-05-24 13:50:34.310612054 +0200
90eaf5
+++ gnome-software-3.36.1/plugins/flatpak/gs-plugin-flatpak.c	2021-05-24 13:50:39.161609727 +0200
90eaf5
@@ -218,6 +218,7 @@ gs_plugin_add_updates (GsPlugin *plugin,
90eaf5
 		if (!gs_flatpak_add_updates (flatpak, list, cancellable, error))
90eaf5
 			return FALSE;
90eaf5
 	}
90eaf5
+	gs_plugin_cache_lookup_by_state (plugin, list, AS_APP_STATE_INSTALLING);
90eaf5
 	return TRUE;
90eaf5
 }
90eaf5
 
90eaf5
diff -up gnome-software-3.36.1/src/gs-updates-page.c.1888404 gnome-software-3.36.1/src/gs-updates-page.c
90eaf5
--- gnome-software-3.36.1/src/gs-updates-page.c.1888404	2021-05-24 13:50:39.161609727 +0200
90eaf5
+++ gnome-software-3.36.1/src/gs-updates-page.c	2021-05-24 13:51:00.211599638 +0200
90eaf5
@@ -139,7 +139,8 @@ gs_updates_page_invalidate (GsUpdatesPag
90eaf5
 static GsUpdatesSectionKind
90eaf5
 _get_app_section (GsApp *app)
90eaf5
 {
90eaf5
-	if (gs_app_get_state (app) == AS_APP_STATE_UPDATABLE_LIVE) {
90eaf5
+	if (gs_app_get_state (app) == AS_APP_STATE_UPDATABLE_LIVE ||
90eaf5
+	    gs_app_get_state (app) == AS_APP_STATE_INSTALLING) {
90eaf5
 		if (gs_app_get_kind (app) == AS_APP_KIND_FIRMWARE)
90eaf5
 			return GS_UPDATES_SECTION_KIND_ONLINE_FIRMWARE;
90eaf5
 		return GS_UPDATES_SECTION_KIND_ONLINE;