Client.onReady has already loaded the app list

This commit is contained in:
Girish Ramakrishnan
2018-06-25 18:06:17 -07:00
parent f167714ea1
commit a77918bef9

View File

@@ -583,21 +583,17 @@ angular.module('Application').controller('AppsController', ['$scope', '$location
}
Client.onReady(function () {
Client.refreshInstalledApps(function (error) {
if (error) return console.error(error);
if ($scope.user.caps.apps) {
fetchUsers();
fetchGroups();
getDomains();
getBackupConfig();
}
if ($scope.user.caps.apps) {
fetchUsers();
fetchGroups();
getDomains();
getBackupConfig();
}
var refreshAppsTimer = $interval(Client.refreshInstalledApps.bind(Client), 5000);
var refreshAppsTimer = $interval(Client.refreshInstalledApps.bind(Client), 5000);
$scope.$on('$destroy', function () {
$interval.cancel(refreshAppsTimer);
});
$scope.$on('$destroy', function () {
$interval.cancel(refreshAppsTimer);
});
});