samuelclay/NewsBlur — pull request #218 by ojiikun (2013-04-26 07:24:53+00:00)
Title: Ensure All Stories Heading Always Appears

This is the more complete fix for Issue #209 where the All Stories heading was not appearing if the user had no feeds in the top-level/root folder.

As agreed by the devs, this also implements #139 to wipe the local database on upgrade to prevent bugs caused by non-forward-compatibility. The local prefs store is retained, so at least users do not have to re-login on upgrade.

This fix is admittedly grotesque. The root cause of these bugs has been the high degree of magic found in the `FeedProvider` wrapper around the standard Android `ContentProvider`. I added some warning documentation and some helpful debugging tools, but this whole class is an antipattern that needs to be resolved at some point. We are deep into SQL that sqlite handles in a buggy and undocumented fashion.

We should test this very well before pushing to market.