mirror of
https://github.com/TracksApp/tracks.git
synced 2026-03-08 05:32:37 +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
|
end
|
||||||
|
|
||||||
def todo_moved_out_of_container
|
def todo_moved_out_of_container
|
||||||
return
|
# moved from one project container to another
|
||||||
# moved from one project container to another
|
moved_project = @project_changed && @group_view_by=='project'
|
||||||
(@project_changed && @group_view_by=='project') ||
|
# moved from one context container to another
|
||||||
# moved from one context container to another
|
moved_context = @context_changed && @group_view_by=='context'
|
||||||
(@context_changed && @group_view_by=='context') ||
|
# moved from actions-without-project container to another
|
||||||
# moved from actions-without-project container to another
|
moved_without_project = @context_changed && @group_view_by=='project' && @todo.project_id.nil?
|
||||||
(@context_changed && @group_view_by=='project' && @todo.project_id.nil?)
|
|
||||||
|
return moved_project || moved_context || moved_without_project
|
||||||
end
|
end
|
||||||
|
|
||||||
def update_needs_to_hide_container
|
def update_needs_to_hide_container
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue