todotxt / todo.txt-ios

Official Todo.txt iOS app for managing your todo.txt file stored in Dropbox.
http://todotxt.org
GNU General Public License v3.0
379 stars 112 forks source link

ability to clear all filters #229

Open lancegosby opened 10 years ago

lancegosby commented 10 years ago

Or, possibly clear filters after archiving last item in a context/project

I am able to reproduce the issue with the following steps:

  1. create a task with @test context
  2. filter tasks by @test
  3. complete the final task under this context and archive it

Your task list will still be filtered by @test but with no tasks using @test, there is no way that I see to clear the filter.

one workaround is to:

  1. create a temp task with @test
  2. deselect @test from filters
  3. delete temp task

behaviour seems the same for projects and contexts. didn't test but imagine similar if deleting the last task instead of archiving.

stevendpclark commented 9 years ago

Confirmed its the same behaviour if you delete or archive the task. The workaround would be as mentioned or restart the application.

I'm not sure if the correct behaviour should be

  1. Simply remove the context from the filtering automatically which would show an unfiltered view if it was the sole filtering context
  2. Keep the filtering logic as is but display it within the filtering menu so an end user can remove it manually from the filter menu page

I think option 2 feels right to me, Gina or anyone else have any opinions?

stevendpclark commented 9 years ago

@ginatrapani I have a patch for this issue as well. It depends on the other patches though so I am not sure how to send the patch to you? Its not 100% perfect, the only issue with it, is on iPad interfaces will not cleanup entries for deleted items when the selected items are unselected, it will clean them up if any changes to tasks are made though.

The patch is available here: https://gist.githubusercontent.com/stevendpclark/1cbc8f230372239adf7c/raw/c2c5e6e2692f2b93a7ff1a8c001d951b15b08787/229-show-selected-filters-when-task-is-deleted.patch