Skip to content

Commit

Permalink
Fixed updateList extension
Browse files Browse the repository at this point in the history
  • Loading branch information
Rakhimulin Damir committed Jan 28, 2021
1 parent b6a9722 commit 9fcc859
Showing 1 changed file with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,9 @@ fun RecyclerView.configure(
}

fun RecyclerView.updateList(newList: List<Any>) {
(adapter as? MultiBindingAdapter)?.updateList(newList)
(adapter as? MultiBindingAdapter)?.apply {
items = newList
}
}

fun <T> RecyclerView.getItems() = (adapter as? MultiBindingAdapter)?.items as? List<T>
Expand Down

0 comments on commit 9fcc859

Please sign in to comment.