Improve refresh view
This commit is contained in:
@@ -29,6 +29,7 @@ function FileTreeController($scope, $translate, $timeout, Client) {
|
||||
$scope.view = this.view;
|
||||
|
||||
$scope.busy = true;
|
||||
$scope.busyRefresh = false;
|
||||
$scope.client = Client;
|
||||
$scope.cwd = null;
|
||||
$scope.cwdParts = [];
|
||||
@@ -284,6 +285,8 @@ function FileTreeController($scope, $translate, $timeout, Client) {
|
||||
// called from the parent
|
||||
$scope.onRefresh = function () {
|
||||
$scope.selected = [];
|
||||
$scope.busy = true;
|
||||
$scope.busyRefresh = true;
|
||||
|
||||
Client.filesGet($scope.backendId, $scope.backendType, $scope.cwd, 'data', function (error, result) {
|
||||
if (error) return Client.error(error);
|
||||
@@ -292,6 +295,7 @@ function FileTreeController($scope, $translate, $timeout, Client) {
|
||||
amendIcons();
|
||||
sort();
|
||||
|
||||
$scope.busyRefresh = false;
|
||||
$scope.busy = false;
|
||||
});
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user