Skip to content

Commit

Permalink
scroll to top when set data
Browse files Browse the repository at this point in the history
  • Loading branch information
SilenceDut committed Jun 27, 2019
1 parent 2b4e5ff commit 32354a0
Showing 1 changed file with 6 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -283,7 +283,12 @@ public void setDatas(List<? extends BaseMutableData> datas) {
List<BaseMutableData> newList = new ArrayList<>(datas);
mDifferHelper.submitList(newList);
if(mAttachedRecyclerView!=null) {
RvHelper.Companion.scrollToBottom(mAttachedRecyclerView,0);
mDiffHandler.postDelayed(new Runnable() {
@Override
public void run() {
RvHelper.Companion.scrollToBottom(mAttachedRecyclerView,0);
}
},1000);
}
}

Expand Down

0 comments on commit 32354a0

Please sign in to comment.