Improve refresh view

This commit is contained in:
Johannes Zellner
2022-09-02 15:34:09 +02:00
parent 4984e6b2b7
commit 40fbea58dd
2 changed files with 8 additions and 4 deletions
+4
View File
@@ -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;
});
};