Преглед на файлове

check the right var for null

Signed-off-by: Andy Scherzinger <info@andy-scherzinger.de>
Andy Scherzinger преди 1 година
родител
ревизия
7b4ecf7dc5
променени са 1 файла, в които са добавени 1 реда и са изтрити 1 реда
  1. 1 1
      app/src/main/java/com/owncloud/android/ui/fragment/ExtendedListFragment.java

+ 1 - 1
app/src/main/java/com/owncloud/android/ui/fragment/ExtendedListFragment.java

@@ -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);