mirror of
https://github.com/nextcloud/android.git
synced 2024-11-24 06:05:42 +03:00
check the right var for null
Signed-off-by: Andy Scherzinger <info@andy-scherzinger.de>
This commit is contained in:
parent
d6f77e2491
commit
7b4ecf7dc5
1 changed files with 1 additions and 1 deletions
|
@ -467,7 +467,7 @@ public class ExtendedListFragment extends Fragment implements
|
|||
private void scrollToPosition(int position) {
|
||||
LinearLayoutManager linearLayoutManager = (LinearLayoutManager) mRecyclerView.getLayoutManager();
|
||||
|
||||
if (mRecyclerView != null) {
|
||||
if (linearLayoutManager != null) {
|
||||
int visibleItemCount = linearLayoutManager.findLastCompletelyVisibleItemPosition() -
|
||||
linearLayoutManager.findFirstCompletelyVisibleItemPosition();
|
||||
linearLayoutManager.scrollToPositionWithOffset(position, (visibleItemCount / 2) * mHeightCell);
|
||||
|
|
Loading…
Reference in a new issue