mirror of
https://github.com/HabitRPG/habitica.git
synced 2025-12-18 15:17:25 +01:00
fix(client): Stop duplicating completed todos (#7709)
* Deduping completed tasks on load. closes #7708 * Addressing paglias' comment
This commit is contained in:
@@ -156,7 +156,11 @@ habitrpg.controller("TasksCtrl", ['$scope', '$rootScope', '$location', 'User','N
|
||||
$scope._today = moment().add({days: 1});
|
||||
|
||||
$scope.loadedCompletedTodos = function () {
|
||||
if (Tasks.loadedCompletedTodos === true) return;
|
||||
if (Tasks.loadedCompletedTodos === true) {
|
||||
return;
|
||||
}
|
||||
|
||||
User.user.todos = _.reject(User.user.todos, 'completed')
|
||||
|
||||
Tasks.getUserTasks(true)
|
||||
.then(function (response) {
|
||||
|
||||
Reference in New Issue
Block a user