From bf4d02a6573b5913288fd34ca3fde5bb9d019a13 Mon Sep 17 00:00:00 2001 From: MaysWind Date: Sun, 5 Jun 2016 11:36:21 +0800 Subject: [PATCH] refresh global status after task status changed --- app/scripts/controllers/main.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/app/scripts/controllers/main.js b/app/scripts/controllers/main.js index 99fa254..86fd94e 100644 --- a/app/scripts/controllers/main.js +++ b/app/scripts/controllers/main.js @@ -68,6 +68,7 @@ } $rootScope.loadPromise = invoke(gids, function (result) { + refreshGlobalStat(false); $route.reload(); }); }; @@ -81,6 +82,7 @@ ariaNgCommonService.confirm('Confirm Remove', 'Are you sure you want to remove the selected task?', 'warning', function () { $rootScope.loadPromise = aria2TaskService.removeTasks(tasks, function (result) { + refreshGlobalStat(false); if ($location.path() == '/stopped') { $route.reload(); } else { @@ -93,6 +95,7 @@ $scope.clearStoppedTasks = function () { ariaNgCommonService.confirm('Confirm Clear', 'Are you sure you want to clear stopped tasks?', 'warning', function () { $rootScope.loadPromise = aria2TaskService.clearStoppedTasks(function (result) { + refreshGlobalStat(false); if ($location.path() == '/stopped') { $route.reload(); } else {