ui:fragment: Use isEmpty() to check if list of activities is empty.

Using Collection.size() to test for emptiness works, but using Collection.isEmpty() makes the code more readable and can be more performant
This commit is contained in:
eho 2018-06-04 16:07:29 +02:00
parent 9385f5d2f2
commit b1e032cd6c

View file

@ -243,7 +243,7 @@ public class FileDetailActivitiesFragment extends Fragment implements ActivityLi
activity.runOnUiThread(() -> {
populateList(activities, ownCloudClient, pageUrl == null);
if (activities.size() > 0) {
if (!activities.isEmpty()) {
empty.setVisibility(View.GONE);
list.setVisibility(View.VISIBLE);
} else {