[gnome-software/1587-updates-glitchy-empty-list: 10/11] gs-installed-page: Unify unreveal of an app row




commit 0a36f5eed8a29b2bf532bd6a9356a3dea8e917df
Author: Milan Crha <mcrha redhat com>
Date:   Thu Aug 25 08:04:31 2022 +0200

    gs-installed-page: Unify unreveal of an app row
    
    Since the GsAppRow handles the unmapped state on its own now,
    the code can be simplified on the installed page side.

 src/gs-installed-page.c | 14 +++-----------
 1 file changed, 3 insertions(+), 11 deletions(-)
---
diff --git a/src/gs-installed-page.c b/src/gs-installed-page.c
index c67b9915b..4b2997df6 100644
--- a/src/gs-installed-page.c
+++ b/src/gs-installed-page.c
@@ -184,17 +184,9 @@ gs_installed_page_unreveal_row (GsAppRow *app_row)
                                                      G_CALLBACK (gs_installed_page_notify_state_changed_cb), 
NULL);
        }
 
-       /* This check is required, because GsAppRow does not emit
-        * the signal when the row is not realized. This can happen
-        * when installing/uninstalling an app without visiting
-        * the Installed page. */
-       if (!gtk_widget_get_mapped (GTK_WIDGET (app_row))) {
-               row_unrevealed (G_OBJECT (app_row), NULL, NULL);
-       } else {
-               g_signal_connect (app_row, "unrevealed",
-                                 G_CALLBACK (row_unrevealed), NULL);
-               gs_app_row_unreveal (app_row);
-       }
+       g_signal_connect (app_row, "unrevealed",
+                         G_CALLBACK (row_unrevealed), NULL);
+       gs_app_row_unreveal (app_row);
 }
 
 static GsAppRow *  /* (transfer none) */


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