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




commit 881ab43a3e355689bbabd941763b637f5f66bb1f
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 85ef4b4ad..674a11443 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]