修改通用链接详情刷新过程中滑动列表闪退问题
This commit is contained in:
@ -76,7 +76,8 @@ class CommonCollectionDetailFragment : LazyListFragment<LinkEntity, CommonCollec
|
||||
if (newState == RecyclerView.SCROLL_STATE_IDLE) {
|
||||
val commonLinkCollection = mViewModel.commonCollectionLiveData.value
|
||||
var position = mLayoutManager.findLastCompletelyVisibleItemPosition()
|
||||
if (position == -1) position = mLayoutManager.findLastVisibleItemPosition() - 1
|
||||
if (position < 0) position = mLayoutManager.findLastVisibleItemPosition() - 1
|
||||
if (position < 0 || position >= commonLinkCollection?.linkList?.size ?: 0) return
|
||||
val linkEntity = commonLinkCollection?.linkList?.get(position)
|
||||
NewLogUtils.logSlideCommonCollection(
|
||||
commonLinkCollection?.id ?: "",
|
||||
|
||||
Reference in New Issue
Block a user