mirror of
https://github.com/nextcloud/android.git
synced 2024-11-26 23:28:42 +03:00
codacy: These nested if statements could be combined
Signed-off-by: Andy Scherzinger <info@andy-scherzinger.de>
This commit is contained in:
parent
d445be1b5f
commit
d2c9e3273f
2 changed files with 6 additions and 8 deletions
|
@ -218,11 +218,10 @@ public class ExtendedListFragment extends Fragment implements
|
|||
handler.postDelayed(new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
if (getActivity() != null && !(getActivity() instanceof FolderPickerActivity)) {
|
||||
|
||||
if (!(getActivity() instanceof UploadFilesActivity)) {
|
||||
if (getActivity() != null && !(getActivity() instanceof FolderPickerActivity)
|
||||
&& !(getActivity() instanceof UploadFilesActivity)) {
|
||||
setFabVisible(!hasFocus);
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
}, 100);
|
||||
|
|
|
@ -170,13 +170,12 @@ public class PhotoFragment extends OCFileListFragment {
|
|||
int totalItemCount = gridLayoutManager.getItemCount();
|
||||
int firstVisibleItem = gridLayoutManager.findFirstCompletelyVisibleItemPosition();
|
||||
|
||||
if ((totalItemCount - visibleItemCount) <= (firstVisibleItem + MAX_ITEMS_PER_ROW)) {
|
||||
if ((totalItemCount - visibleItemCount) <= (firstVisibleItem + MAX_ITEMS_PER_ROW)
|
||||
&& (totalItemCount - visibleItemCount) > 0) {
|
||||
// Almost reached the end, continue to load new photos
|
||||
if ((totalItemCount - visibleItemCount) > 0) {
|
||||
searchAndDisplay();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue