disable auto refreshing in task detail page when task is completed, error or removed
This commit is contained in:
parent
323a2635c0
commit
9d9a9a83c3
|
@ -198,7 +198,7 @@
|
||||||
if (!$scope.task || !$scope.task.files || !ariaNgFileTypes[type]) {
|
if (!$scope.task || !$scope.task.files || !ariaNgFileTypes[type]) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
var extensions = ariaNgFileTypes[type];
|
var extensions = ariaNgFileTypes[type];
|
||||||
var fileIndexes = [];
|
var fileIndexes = [];
|
||||||
var isAllSelected = true;
|
var isAllSelected = true;
|
||||||
|
@ -284,6 +284,11 @@
|
||||||
|
|
||||||
if (ariaNgSettingService.getDownloadTaskRefreshInterval() > 0) {
|
if (ariaNgSettingService.getDownloadTaskRefreshInterval() > 0) {
|
||||||
downloadTaskRefreshPromise = $interval(function () {
|
downloadTaskRefreshPromise = $interval(function () {
|
||||||
|
if ($scope.task && ($scope.task.status == 'complete' || $scope.task.status == 'error' || $scope.task.status == 'removed')) {
|
||||||
|
$interval.cancel(downloadTaskRefreshPromise);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
refreshDownloadTask(true);
|
refreshDownloadTask(true);
|
||||||
}, ariaNgSettingService.getDownloadTaskRefreshInterval());
|
}, ariaNgSettingService.getDownloadTaskRefreshInterval());
|
||||||
}
|
}
|
||||||
|
|
Reference in a new issue