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

Deleting the last item of a project while filtering on project causes all items to disappear #251

Open rhussmann opened 8 years ago

rhussmann commented 8 years ago

Overview

If you delete the last item of a project while filtering on that project, the item is deleted but the filter appears to persist. However, since the item was deleted, the +project no longer appears in the list of projects. Hence, there's no way to disable the project filter.

Steps to reproduce

  1. Create a new todo for a unique project (e.g. "This is a test +recreatingIssueProjectTest")
  2. Filter on the project (e.g. +recreatingIssueProjectTest)
  3. Verify there is only one item being displayed; the item that was just created
  4. Tap the item to bring up the details
  5. Selecte "Delete"
  6. Upon deletion, you are returned to the ToDo list; verify no ToDos are displayed
  7. View the list of filters
  8. Verify no filters are checked
  9. Verify there is no way to disable the project filter +recreatingIssueProjectTest as it was removed from the list

    Impact

Once in this state, the user will no longer be able to view their existing list of Todos, nor disable the previously selected project filter. This does not cause any data to actually be deleted (except for the ToDo that was just deleted to reproduce the issue).

Workaround

Once in this state, I have discovered two workarounds:

  1. Force-close the application
  2. Create a new task in the previous project (e.g. "This is my new task for +recreatingIssueProjectTest"); at this point the filter list will include the project recreatingIssueProjectTest which can be disabled