diff --git a/app/controllers/todos_controller.rb b/app/controllers/todos_controller.rb index 5e413fed..bba83f78 100644 --- a/app/controllers/todos_controller.rb +++ b/app/controllers/todos_controller.rb @@ -417,6 +417,8 @@ class TodosController < ApplicationController @context_id = @todo.context_id @project_id = @todo.project_id @todo_was_destroyed_from_deferred_state = @todo.deferred? + @todo_was_destroyed_from_pending_state = @todo.pending? + @todo_was_destroyed_from_deferred_or_pending_state = @todo_was_destroyed_from_deferred_state || @todo_was_destroyed_from_pending_state # activate successors if they only depend on this todo activated_successor_count = 0 diff --git a/app/helpers/todos_helper.rb b/app/helpers/todos_helper.rb index a02657c4..5c846752 100644 --- a/app/helpers/todos_helper.rb +++ b/app/helpers/todos_helper.rb @@ -379,7 +379,7 @@ module TodosHelper page.project { container_id = "p#{@original_item_project_id}empty-nd" if @remaining_in_context == 0 container_id = "tickler-empty-nd" if ( - ( (@todo_was_activated_from_deferred_state || @todo_was_activated_from_pending_state) && @remaining_deferred_or_pending_count == 0) || + ( (@todo_was_activated_from_deferred_state || @todo_was_activated_from_pending_state || @todo_was_destroyed_from_deferred_or_pending_state) && @remaining_deferred_or_pending_count == 0) || (@original_item_was_deferred && @remaining_deferred_or_pending_count == 0 && @todo.completed?) ) container_id = "empty-d" if @completed_count && @completed_count == 0 && !@todo.completed? }