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



commit 428f334fdbb9bf6f44ad06c376121103e5f4bf67
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 7a19d8ad..d302e651 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]