mirror of
https://github.com/TracksApp/tracks.git
synced 2025-12-24 11:10:12 +01:00
Fix check for whether todo changed containers
This commit is contained in:
parent
dbf1cb61ff
commit
50b09811fc
1 changed files with 8 additions and 7 deletions
|
|
@ -508,13 +508,14 @@ module TodosHelper
|
|||
end
|
||||
|
||||
def todo_moved_out_of_container
|
||||
return
|
||||
# moved from one project container to another
|
||||
(@project_changed && @group_view_by=='project') ||
|
||||
# moved from one context container to another
|
||||
(@context_changed && @group_view_by=='context') ||
|
||||
# moved from actions-without-project container to another
|
||||
(@context_changed && @group_view_by=='project' && @todo.project_id.nil?)
|
||||
# moved from one project container to another
|
||||
moved_project = @project_changed && @group_view_by=='project'
|
||||
# moved from one context container to another
|
||||
moved_context = @context_changed && @group_view_by=='context'
|
||||
# moved from actions-without-project container to another
|
||||
moved_without_project = @context_changed && @group_view_by=='project' && @todo.project_id.nil?
|
||||
|
||||
return moved_project || moved_context || moved_without_project
|
||||
end
|
||||
|
||||
def update_needs_to_hide_container
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue