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() {
|
handler.postDelayed(new Runnable() {
|
||||||
@Override
|
@Override
|
||||||
public void run() {
|
public void run() {
|
||||||
if (getActivity() != null && !(getActivity() instanceof FolderPickerActivity)) {
|
if (getActivity() != null && !(getActivity() instanceof FolderPickerActivity)
|
||||||
|
&& !(getActivity() instanceof UploadFilesActivity)) {
|
||||||
|
setFabVisible(!hasFocus);
|
||||||
|
|
||||||
if (!(getActivity() instanceof UploadFilesActivity)) {
|
|
||||||
setFabVisible(!hasFocus);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}, 100);
|
}, 100);
|
||||||
|
|
|
@ -170,11 +170,10 @@ public class PhotoFragment extends OCFileListFragment {
|
||||||
int totalItemCount = gridLayoutManager.getItemCount();
|
int totalItemCount = gridLayoutManager.getItemCount();
|
||||||
int firstVisibleItem = gridLayoutManager.findFirstCompletelyVisibleItemPosition();
|
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
|
// Almost reached the end, continue to load new photos
|
||||||
if ((totalItemCount - visibleItemCount) > 0) {
|
searchAndDisplay();
|
||||||
searchAndDisplay();
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue