To finish this chapter, we are going to update our RSS Reader so that it fetches information on demand. The idea is that we will fetch one feed at the beginning, and from there on we fetch one more feed as the user scrolls down close to the end of the list. That way, we reduce the amount of data consumed.
Producers in action
Having the adapter request more articles
We want to be able to request articles as the user scrolls, so the first step is to connect the adapter with the articles to a listener that can fetch more articles when needed. To do this, we are first going to add an interface to the same file where the class ArticleAdapter resides:
interface ArticleLoader {
suspend fun loadMore()
}
class ArticleAdapter: RecyclerView...