Browse Source

revert creating object in loop

tobiaskaminsky 7 years ago
parent
commit
d3754d156a

+ 2 - 1
src/main/java/com/owncloud/android/datamodel/FileDataStorageManager.java

@@ -2159,9 +2159,10 @@ public class FileDataStorageManager {
         }
 
         if (onlyImages) {
+            OCFile current;
             Vector<OCFile> temp = new Vector<>();
             for (int i=0; i < ocFiles.size(); i++) {
-                OCFile current = ocFiles.get(i);
+                current = ocFiles.get(i);
                 if (MimeTypeUtil.isImage(current)) {
                     temp.add(current);
                 }