fix: Update client to remove completed todos immediately

closes #7549
closes #7685
This commit is contained in:
Husman
2016-06-18 09:40:45 -07:00
committed by Blade Barringer
parent ea5a148add
commit 1a19605ee6
3 changed files with 6 additions and 1 deletions

View File

@@ -74,7 +74,11 @@ habitrpg.controller("TasksCtrl", ['$scope', '$rootScope', '$location', 'User','N
* Add the new task to the actions log
*/
$scope.clearDoneTodos = function() {
if (!confirm(window.env.t('sureDeleteCompletedTodos'))) {
return;
}
Tasks.clearCompletedTodos();
User.user.todos = _.reject(User.user.todos, 'completed');
};
/**