Skip to content

Commit

Permalink
fix(android): resolve #1104 commit crash
Browse files Browse the repository at this point in the history
  • Loading branch information
siguangli2018 authored and zoomchan-cxj committed Nov 24, 2021
1 parent 10fdadb commit 626cb0d
Showing 1 changed file with 8 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -179,6 +179,10 @@ public void setListData() {
scrollToInitContentOffset();
}

if (mExposureEventEnable) {
dispatchExposureEvent();
}

hasCompleteFirstBatch = true;
}
}
Expand Down Expand Up @@ -488,9 +492,6 @@ protected void onScrollFlingEnded() {
@Override
protected void onLayout(boolean changed, int l, int t, int r, int b) {
super.onLayout(changed, l, t, r, b);
if (changed && mExposureEventEnable) {
dispatchExposureEvent();
}
}

@Override
Expand Down Expand Up @@ -574,6 +575,10 @@ protected void checkExposureView(View view, int visibleStart, int visibleEnd, in
private void dispatchExposureEvent() {
if (mLayout instanceof BaseLayoutManager) {
BaseLayoutManager.OrientationHelper layoutHelper = ((BaseLayoutManager) mLayout).mOrientationHelper;
if (layoutHelper == null) {
return;
}

int count = getChildCount();
int fixOffset = (mLayout.canScrollHorizontally()) ? mState.mCustomHeaderWidth
: mState.mCustomHeaderHeight;
Expand Down

0 comments on commit 626cb0d

Please sign in to comment.