From 0aceed22f442c5f5ad1fbc7685bb0e0bd585ec2e Mon Sep 17 00:00:00 2001 From: MaysWind Date: Tue, 14 Aug 2018 01:18:04 +0800 Subject: [PATCH] support click "(choose file)" to cancel current operation --- src/scripts/controllers/task-detail.js | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/scripts/controllers/task-detail.js b/src/scripts/controllers/task-detail.js index 7a48ca4..fcd7fb7 100644 --- a/src/scripts/controllers/task-detail.js +++ b/src/scripts/controllers/task-detail.js @@ -264,8 +264,12 @@ }; $scope.showChooseFilesToolbar = function () { - pauseDownloadTaskRefresh = true; - $scope.context.showChooseFilesToolbar = true; + if (!$scope.context.showChooseFilesToolbar) { + pauseDownloadTaskRefresh = true; + $scope.context.showChooseFilesToolbar = true; + } else { + $scope.cancelChooseFiles(); + } }; $scope.isAnyFileSelected = function () {