Currently, our adapter doesn't expose any function that will allow external clients to add articles to it. Let's add a simple function to allow groups of articles to be added:
fun add(articles: List<Article>) {
this.articles.addAll(articles)
notifyDataSetChanged()
}
notifyDataSetChanged() will let the adapter know that the contents have changed. This may cause items to be redrawn.