mirror of
https://github.com/HabitRPG/habitica.git
synced 2025-12-17 22:57:21 +01:00
fix: Update client to remove completed todos immediately
closes #7549 closes #7685
This commit is contained in:
@@ -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');
|
||||
};
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user