vickychijwani / quill

:ghost: [MOVED TO https://github.com/TryGhost/Ghost-Android] The beautiful Android app for your Ghost blog.
MIT License
553 stars 84 forks source link

Data refresh in onResume intermittently gets stuck #79

Closed vickychijwani closed 9 years ago

vickychijwani commented 9 years ago

Sometimes when I switch to another app and return to Quill later, or when my network connection is especially slow, the automatic data refresh in onResume gets stuck. What's worse, even cached data doesn't show up in the meantime, just a blank home screen, and even triggering a manual refresh doesn't help. The only way to fix it in such a case is to kill the app.

At one point I managed to catch this issue in action and noticed that the RefreshEventsQueue in NetworkService is not being cleared (presumably because a request didn't timeout directly -- perhaps a Retrofit issue? EDIT: see #90), which is what makes even manual refreshes useless.

Possible fixes / changes (more than one of them may be required for robustness):