emitron-Android icon indicating copy to clipboard operation
emitron-Android copied to clipboard

Library Screen Performance

Open orionthewake opened this issue 4 years ago • 0 comments

Each time it is brought to the foreground, the Library screen seems to wait for the completion of a network call to the /content endpoint before showing any data, even when courses are present in the local database.

We need to ensure that the Library screen is using a Repository pattern, with the local DB serving as a single-source-of-truth. When the Library screen is opened, we should be kicking off an asynchronous network call to fetch new course data, but concurrently showing course data available in the local DB. When the network call completes, we can refresh the Library list data with any new content available in the local DB. This should all be done with some kind of observable stream, e.g. Rx or Kotlin Flow.

orionthewake avatar Sep 30 '20 13:09 orionthewake