mirror of
https://github.com/TracksApp/tracks.git
synced 2025-12-26 20:08:51 +01:00
fix small corner case where empty message was not shown when deleting last deferred todo from a project page
This commit is contained in:
parent
1a9b84701b
commit
efa12e6695
2 changed files with 3 additions and 1 deletions
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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?
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue