[gnome-software/gnome-3-30] updates page: Ignore refresh if we're already in the loading state



commit 1777ad0c2ba541cf691b9788f0aadc97d231092b
Author: Kalev Lember <klember redhat com>
Date:   Mon Nov 26 14:53:03 2018 +0100

    updates page: Ignore refresh if we're already in the loading state
    
    This might help with various issues that people have reported with the
    updates page getting stuck in the loading state, e.g.
    https://bugzilla.redhat.com/show_bug.cgi?id=1641220

 src/gs-updates-page.c | 6 ++++++
 1 file changed, 6 insertions(+)
---
diff --git a/src/gs-updates-page.c b/src/gs-updates-page.c
index 0d78b727..89171400 100644
--- a/src/gs-updates-page.c
+++ b/src/gs-updates-page.c
@@ -710,6 +710,12 @@ static void
 gs_updates_page_reload (GsPage *page)
 {
        GsUpdatesPage *self = GS_UPDATES_PAGE (page);
+
+       if (self->state == GS_UPDATES_PAGE_STATE_ACTION_REFRESH) {
+               g_debug ("ignoring reload as refresh is already in progress");
+               return;
+       }
+
        gs_updates_page_invalidate (self);
        gs_updates_page_load (self);
 }


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