emitron-Android
emitron-Android copied to clipboard
Library Screen Performance
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.