mirror of
https://github.com/TracksApp/tracks.git
synced 2025-12-26 12:08:47 +01:00
Properly update the project page for hidden projects
Immediately after hiding a project, if a user marks a todo as done, they would erroneously see a "There are no incomplete actions in this project" banner under the open actions section. This commit uses the active_or_hidden scope for the project todos in order to fix this, since the todos are active but hidden due to the project. Fixes #1202
This commit is contained in:
parent
cda75a0cc1
commit
66b96e0c0c
1 changed files with 1 additions and 1 deletions
|
|
@ -1103,7 +1103,7 @@ class TodosController < ApplicationController
|
|||
if @todo_was_completed_from_deferred_or_blocked_state
|
||||
@remaining_in_context = @remaining_deferred_or_pending_count
|
||||
else
|
||||
@remaining_in_context = current_user.projects.find(project_id).todos.active.count
|
||||
@remaining_in_context = current_user.projects.find(project_id).todos.active_or_hidden.count
|
||||
end
|
||||
|
||||
@target_context_count = current_user.projects.find(project_id).todos.active.count
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue