[chrome-gnome-shell/release/v10.1: 3/7] update: log update errors to console instead of making notification.



commit 87c5a39f26b3c47d8456fab248141900dd47b54d
Author: Yuri Konotopov <ykonotopov gnome org>
Date:   Sat Mar 10 10:54:54 2018 +0400

    update: log update errors to console instead of making notification.
    
    Gnome-Bug: https://bugzilla.gnome.org/show_bug.cgi?id=783469
    
    # Conflicts:
    #   extension/include/update.js

 extension/include/update.js |   18 ++++--------------
 1 files changed, 4 insertions(+), 14 deletions(-)
---
diff --git a/extension/include/update.js b/extension/include/update.js
index 3cd56a8..d6d3525 100644
--- a/extension/include/update.js
+++ b/extension/include/update.js
@@ -40,9 +40,9 @@ GSC.update = (function($) {
                                                {
                                                        onSweetToothResponse(response.upgrade, 
response.extensions);
                                                }
-                                               else
+                                               else if(console)
                                                {
-                                                       createUpdateFailedNotification(response.message ? 
response.message : m('native_request_failed', 'checkUpdate'));
+                                                       console.error(response.message ? response.message : 
m('native_request_failed', 'checkUpdate'));
                                                }
                                        });
                                }
@@ -53,9 +53,9 @@ GSC.update = (function($) {
                                        });
                                }
                        }
-                       else
+                       else if(console)
                        {
-                               createUpdateFailedNotification(response.message ? response.message : 
m('native_request_failed', 'initialize'));
+                               console.error(response.message ? response.message : 
m('native_request_failed', 'initialize'));
                        }
                });
        }
@@ -90,16 +90,6 @@ GSC.update = (function($) {
                });
        }
 
-       function createUpdateFailedNotification(cause) {
-               GSC.notifications.create(NOTIFICATION_UPDATE_CHECK_FAILED, {
-                       message: m('update_check_failed', cause),
-                       buttons: [
-                               {title: m('retry')},
-                               {title: m('close')}
-                       ]
-               });
-       }
-
        function init() {
                function onNotificationAction(notificationId, buttonIndex) {
                        if ($.inArray(notificationId, [NOTIFICATION_UPDATE_AVAILABLE, 
NOTIFICATION_UPDATE_CHECK_FAILED]) === -1)


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