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



commit dcf6e9c6d6bccb40cfdb85a1203bd5cb4a25f8be
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 425ee029..5fbd7b06 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]