cheshire137 / gh-notifications-snoozer

Lists and filters and snoozing pull requests, oh my! This is an app for managing your notifications on GitHub by way of filtering issues and pull requests that are of interest to you.
MIT License
15 stars 10 forks source link

Remove task state from storage when it drops off #31

Open cheshire137 opened 8 years ago

cheshire137 commented 8 years ago

With #30, tasks can be archived and snoozed and this data is written to the persistent JSON storage file so tasks remain archived/snoozed even when you exit the app and reopen it. Whenever a task stops coming back in the list of tasks from GitHub that match your filter, we should remove all trace of it from the persistent storage. So if your filter includes is:open and eventually the task gets closed on GitHub, we should remove the task key from snoozed, archived, and the archivedAt value in storage. This is so we're not forever increasing the size of our persistent JSON file.

I think if you archive an issue from your is:open filter, the issue gets closed and we remove its 'archived' state from persistent storage, the issue gets reopened and it appears again in the app, this is desired behavior since the reopening signifies something new. The user can always archive it again.