AppPETs/Todo-iOS

Fix crash when toggling task states

blochberger opened this issue · 1 comments

Fix crash when toggling task states

This issue was due to flaky indexPath handling within the table view controller: indexPaths corresponding to taskIds were stored in a map. Whenever a new entry was added, a new indexPath was computed and stored there. When an entry was removed, the corresponding indexPath was also removed. Unfortunately, during removal and during state changes, existing indexPath mappings change but were not updated.

As a result, deleting two entries one after another would crash the app, as would toggling a state change.