Skip to content

Commit

Permalink
Don't notify callback when data set doesn't changed
Browse files Browse the repository at this point in the history
  • Loading branch information
yuyakaido committed Dec 13, 2018
1 parent a99b393 commit 1a4fe01
Showing 1 changed file with 1 addition and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -46,10 +46,7 @@ public RecyclerView.LayoutParams generateDefaultLayoutParams() {

@Override
public void onLayoutChildren(RecyclerView.Recycler recycler, RecyclerView.State state) {
// 表示対象のデータが変更された場合
// 差分更新なし:didStructureChange = true
// 差分更新あり:willRunSimpleAnimations = true
if (state.didStructureChange() || state.willRunSimpleAnimations()) {
if (state.didStructureChange()) {
listener.onCardAppeared(this.state.topPosition);
}
update(recycler);
Expand Down

0 comments on commit 1a4fe01

Please sign in to comment.