[gnome-software/46-when-offline-software-thinks-app-is-installed-when-it-isn-t] Fails to finish pending install after going online



commit 0aa76be66becf61f9c6c690a4d6aca62595f8c1c
Author: Milan Crha <mcrha redhat com>
Date:   Wed Sep 9 11:13:51 2020 +0200

    Fails to finish pending install after going online
    
    The app state was not changed properly for the pending installs
    after going online.
    
    Closes https://gitlab.gnome.org/GNOME/gnome-software/-/issues/46
    Closes https://gitlab.gnome.org/GNOME/gnome-software/-/merge_requests/508

 lib/gs-plugin-loader.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)
---
diff --git a/lib/gs-plugin-loader.c b/lib/gs-plugin-loader.c
index 7783f778..774837aa 100644
--- a/lib/gs-plugin-loader.c
+++ b/lib/gs-plugin-loader.c
@@ -3040,8 +3040,10 @@ gs_plugin_loader_network_changed_cb (GNetworkMonitor *monitor,
                queue = gs_app_list_new ();
                for (guint i = 0; i < priv->pending_apps->len; i++) {
                        GsApp *app = g_ptr_array_index (priv->pending_apps, i);
-                       if (gs_app_get_state (app) == AS_APP_STATE_QUEUED_FOR_INSTALL)
+                       if (gs_app_get_state (app) == AS_APP_STATE_QUEUED_FOR_INSTALL) {
+                               gs_app_set_state (app, AS_APP_STATE_AVAILABLE);
                                gs_app_list_add (queue, app);
+                       }
                }
                g_mutex_unlock (&priv->pending_apps_mutex);
                for (guint i = 0; i < gs_app_list_length (queue); i++) {


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