diff --git a/build.gradle b/build.gradle index 5db707b..9cb046e 100644 --- a/build.gradle +++ b/build.gradle @@ -22,7 +22,7 @@ allprojects { ext { - recyclerView = 'androidx.recyclerview:recyclerview:1.0.0' + recyclerView = 'androidx.recyclerview:recyclerview:1.2.1' appCompat = 'androidx.appcompat:appcompat:1.0.0' androidAnnotations = 'androidx.annotation:annotation:1.0.0' core = 'androidx.core:core:1.0.0' diff --git a/library/src/main/java/com/hannesdorfmann/adapterdelegates4/AsyncListDifferDelegationAdapter.java b/library/src/main/java/com/hannesdorfmann/adapterdelegates4/AsyncListDifferDelegationAdapter.java index 1e88336..8b8aaff 100644 --- a/library/src/main/java/com/hannesdorfmann/adapterdelegates4/AsyncListDifferDelegationAdapter.java +++ b/library/src/main/java/com/hannesdorfmann/adapterdelegates4/AsyncListDifferDelegationAdapter.java @@ -170,6 +170,15 @@ public void setItems(List items) { differ.submitList(items); } + /** + * Set the items / data source of this adapter + * + * @param items The items / data source + * @param commitCallback Runnable that is executed when the List is committed, if it is committed + */ + public void setItems(List items, Runnable commitCallback) { + differ.submitList(items, commitCallback); + } @Override public int getItemCount() {