[gnome-software] updates page: Fix network availability check for mobile refresh



commit 8492c229d60d3dbf073484682002613f6c00ddfa
Author: Kalev Lember <klember redhat com>
Date:   Fri Oct 19 12:11:52 2018 +0200

    updates page: Fix network availability check for mobile refresh
    
    Do the same as for the non-mobile refresh and check the network
    availability before trying to get updates.
    
    I don't think it actually makes any difference, but it makes the code
    easier to read as the two branches then match.

 src/gs-updates-page.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
---
diff --git a/src/gs-updates-page.c b/src/gs-updates-page.c
index 541e4ebd..7e3c9974 100644
--- a/src/gs-updates-page.c
+++ b/src/gs-updates-page.c
@@ -878,7 +878,8 @@ gs_updates_page_button_refresh_cb (GtkWidget *widget,
                gs_updates_page_get_new_updates (self);
 
        /* expensive network connection */
-       } else if (gs_plugin_loader_get_network_metered (self->plugin_loader)) {
+       } else if (gs_plugin_loader_get_network_available (self->plugin_loader) &&
+                  gs_plugin_loader_get_network_metered (self->plugin_loader)) {
                if (self->has_agreed_to_mobile_data) {
                        gs_updates_page_get_new_updates (self);
                        return;


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