mirror of
https://github.com/nextcloud/android.git
synced 2024-11-26 23:28:42 +03:00
Fixes after rebase
This commit is contained in:
parent
9f0008aeb9
commit
2b7c555be8
1 changed files with 5 additions and 33 deletions
|
@ -331,39 +331,11 @@ public class FileStorageUtils {
|
|||
return files.toArray(returnArray);
|
||||
}
|
||||
|
||||
// /**
|
||||
// * Sorts list by Size
|
||||
// * @param sortAscending true: ascending, false: descending
|
||||
// */
|
||||
// public static Vector<OCFile> sortBySize(Vector<OCFile> files){
|
||||
// final Integer val;
|
||||
// if (mSortAscending){
|
||||
// val = 1;
|
||||
// } else {
|
||||
// val = -1;
|
||||
// }
|
||||
//
|
||||
// Collections.sort(files, new Comparator<OCFile>() {
|
||||
// public int compare(OCFile o1, OCFile o2) {
|
||||
// if (o1.isFolder() && o2.isFolder()) {
|
||||
// Long obj1 = getFolderSize(new File(FileStorageUtils.getDefaultSavePathFor(mAccount.name, o1)));
|
||||
// return val * obj1.compareTo(getFolderSize(new File(FileStorageUtils.getDefaultSavePathFor(mAccount.name, o2))));
|
||||
// }
|
||||
// else if (o1.isFolder()) {
|
||||
// return -1;
|
||||
// } else if (o2.isFolder()) {
|
||||
// return 1;
|
||||
// } else if (o1.getFileLength() == 0 || o2.getFileLength() == 0){
|
||||
// return 0;
|
||||
// } else {
|
||||
// Long obj1 = o1.getFileLength();
|
||||
// return val * obj1.compareTo(o2.getFileLength());
|
||||
// }
|
||||
// }
|
||||
// });
|
||||
//
|
||||
// return files;
|
||||
// }
|
||||
/**
|
||||
* Sorts list by Size
|
||||
*/
|
||||
public static Vector<OCFile> sortBySize(Vector<OCFile> files){
|
||||
final int multiplier = mSortAscending ? 1 : -1;
|
||||
|
||||
Collections.sort(files, new Comparator<OCFile>() {
|
||||
public int compare(OCFile o1, OCFile o2) {
|
||||
|
|
Loading…
Reference in a new issue