[gnome-software/1587-updates-glitchy-empty-list] gs-app-row: Avoid piling GtkRevealer-s in the row



commit 9cd3876012fc985e1db6ddfa58a4f01ab5c590b9
Author: Milan Crha <mcrha redhat com>
Date:   Wed Aug 24 05:59:03 2022 +0200

    gs-app-row: Avoid piling GtkRevealer-s in the row
    
    When the app state changes quickly, while the row is unrevealed,
    the row could pile multiple GtkRevealer-s into the row, unnecessarily.

 src/gs-app-row.c | 5 +++++
 1 file changed, 5 insertions(+)
---
diff --git a/src/gs-app-row.c b/src/gs-app-row.c
index 90785befe..26d2e87f9 100644
--- a/src/gs-app-row.c
+++ b/src/gs-app-row.c
@@ -576,6 +576,11 @@ gs_app_row_unreveal (GsAppRow *app_row)
        g_return_if_fail (GS_IS_APP_ROW (app_row));
 
        child = gtk_list_box_row_get_child (GTK_LIST_BOX_ROW (app_row));
+
+       /* This means the row is already hiding */
+       if (GTK_IS_REVEALER (child))
+               return;
+
        gtk_widget_set_sensitive (child, FALSE);
 
        /* Revealer does not animate when the widget is not mapped */


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