diff options
Diffstat (limited to 'app/services/todo_service.rb')
-rw-r--r-- | app/services/todo_service.rb | 18 |
1 files changed, 3 insertions, 15 deletions
diff --git a/app/services/todo_service.rb b/app/services/todo_service.rb index b6125cafa83..e694c5761da 100644 --- a/app/services/todo_service.rb +++ b/app/services/todo_service.rb @@ -31,12 +31,12 @@ class TodoService mark_pending_todos_as_done(issue, current_user) end - # When we destroy an issue we should: + # When we destroy an issuable we should: # # * refresh the todos count cache for the current user # - def destroy_issue(issue, current_user) - destroy_issuable(issue, current_user) + def destroy_issuable(issuable, user) + user.update_todos_count_cache end # When we reassign an issue we should: @@ -72,14 +72,6 @@ class TodoService mark_pending_todos_as_done(merge_request, current_user) end - # When we destroy a merge request we should: - # - # * refresh the todos count cache for the current user - # - def destroy_merge_request(merge_request, current_user) - destroy_issuable(merge_request, current_user) - end - # When we reassign a merge request we should: # # * creates a pending todo for new assignee if merge request is assigned @@ -234,10 +226,6 @@ class TodoService create_mention_todos(issuable.project, issuable, author, nil, skip_users) end - def destroy_issuable(issuable, user) - user.update_todos_count_cache - end - def toggling_tasks?(issuable) issuable.previous_changes.include?('description') && issuable.tasks? && issuable.updated_tasks.any? |