mirror of
https://github.com/TracksApp/tracks.git
synced 2026-01-21 00:16:09 +01:00
fix #875. Make sure that in tag view when you mark the last deferred todo complete, the empty-message appears
This commit is contained in:
parent
43440eaf33
commit
136727fb3f
2 changed files with 9 additions and 1 deletions
|
|
@ -132,6 +132,7 @@ class TodosController < ApplicationController
|
|||
def toggle_check
|
||||
@source_view = params['_source_view'] || 'todo'
|
||||
@original_item_due = @todo.due
|
||||
@original_item_was_deferred = @todo.deferred?
|
||||
@saved = @todo.toggle_completion!
|
||||
|
||||
# check if this todo has a related recurring_todo. If so, create next todo
|
||||
|
|
@ -143,6 +144,7 @@ class TodosController < ApplicationController
|
|||
determine_remaining_in_context_count(@todo.context_id)
|
||||
determine_down_count
|
||||
determine_completed_count if @todo.completed?
|
||||
determine_deferred_tag_count(params['_tag_name']) if @source_view == 'tag'
|
||||
if source_view_is :calendar
|
||||
@original_item_due_id = get_due_id_for_calendar(@original_item_due)
|
||||
@old_due_empty = is_old_due_empty(@original_item_due_id)
|
||||
|
|
|
|||
|
|
@ -16,7 +16,13 @@ if @saved
|
|||
if @remaining_in_context == 0 && source_view_is(:todo)
|
||||
page.visual_effect :fade, item_container_id(@todo), :duration => 0.4
|
||||
end
|
||||
|
||||
|
||||
if @original_item_was_deferred && source_view_is(:tag)
|
||||
# we go from the deferred container to the completed container in tag view
|
||||
# check for empty message
|
||||
page['tickler-empty-nd'].show if @deferred_tag_count == 0
|
||||
end
|
||||
|
||||
# show new todo if the completed todo was recurring
|
||||
if @todo.from_recurring_todo?
|
||||
unless @new_recurring_todo.nil? || @new_recurring_todo.deferred?
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue