calculate the size of directories

+ adding some initial sorting things
This commit is contained in:
tibbi
2016-07-24 16:34:45 +02:00
parent 0c9fe0e4c3
commit fddaea76c3
12 changed files with 66 additions and 31 deletions

View File

@ -210,9 +210,10 @@ public class MainActivity extends SimpleActivity
final Directory directory = directories.get(fileDir);
final int newImageCnt = directory.getMediaCnt() + 1;
directory.setMediaCnt(newImageCnt);
directory.addSize(file.length());
} else if (!mToBeDeleted.contains(fileDir)) {
final String dirName = Utils.getFilename(fileDir);
directories.put(fileDir, new Directory(fileDir, path, dirName, 1, timestamp));
directories.put(fileDir, new Directory(fileDir, path, dirName, 1, timestamp, file.length()));
}
} while (cursor.moveToNext());
cursor.close();