diff --git a/src/js/client.js b/src/js/client.js index 54d8b4186..557ccae23 100644 --- a/src/js/client.js +++ b/src/js/client.js @@ -1601,8 +1601,6 @@ angular.module('Application').service('Client', ['$http', '$interval', '$timeout Client.prototype.refreshAppCache = function (id, callback) { var that = this; - callback = typeof callback === 'function' ? callback : function () {}; - this.getApp(id, function (error, app) { if (error) return callback(error); @@ -1626,8 +1624,6 @@ angular.module('Application').service('Client', ['$http', '$interval', '$timeout Client.prototype.refreshInstalledApps = function (callback) { var that = this; - callback = typeof callback === 'function' ? callback : function () {}; - this.getApps(function (error, apps) { if (error) return callback(error); diff --git a/src/views/app.js b/src/views/app.js index 17ff57ec5..876e91289 100644 --- a/src/views/app.js +++ b/src/views/app.js @@ -684,7 +684,7 @@ angular.module('Application').controller('AppController', ['$scope', '$location' Client.error(error); } else { $('#uninstallModal').modal('hide'); - Client.refreshAppCache($scope.app.id); // reflect the new app state immediately + Client.refreshAppCache($scope.app.id, function() {}); // reflect the new app state immediately $location.path('/apps'); } diff --git a/src/views/apps.js b/src/views/apps.js index 21337d10f..ba118d0fa 100644 --- a/src/views/apps.js +++ b/src/views/apps.js @@ -45,9 +45,9 @@ angular.module('Application').controller('AppsController', ['$scope', '$timeout' }; Client.onReady(function () { - Client.refreshInstalledApps(); // refresh the new list immediately when switching from another view (appstore) + Client.refreshInstalledApps(function () {}); // refresh the new list immediately when switching from another view (appstore) - var refreshAppsTimer = $interval(Client.refreshInstalledApps.bind(Client), 5000); + var refreshAppsTimer = $interval(Client.refreshInstalledApps.bind(Client, function () {}), 5000); $scope.$on('$destroy', function () { $interval.cancel(refreshAppsTimer); });