disable auto refreshing in task detail page when task is completed, error or removed
This commit is contained in:
parent
323a2635c0
commit
9d9a9a83c3
|
@ -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