Skip to content

Commit 8757cd2

Browse files
committed
Merge branch 'develop'
2 parents 878a23d + f1f738a commit 8757cd2

File tree

2 files changed

+3
-6
lines changed

2 files changed

+3
-6
lines changed

app/build.gradle

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,8 @@ android {
99
applicationId "se.arctosoft.vault"
1010
minSdk 28
1111
targetSdk 32
12-
versionCode 5
13-
versionName "1.2.1"
12+
versionCode 6
13+
versionName "1.2.2"
1414

1515
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
1616
}

app/src/main/java/se/arctosoft/vault/data/CursorFile.java

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -14,10 +14,10 @@ public class CursorFile implements Comparable<CursorFile> {
1414
public CursorFile(String name, Uri uri, long lastModified, String mimeType, long size) {
1515
this.name = name;
1616
this.uri = uri;
17-
this.lastModified = lastModified;
1817
this.mimeType = mimeType;
1918
this.size = size;
2019
this.isDirectory = DocumentsContract.Document.MIME_TYPE_DIR.equals(mimeType);
20+
this.lastModified = isDirectory ? System.currentTimeMillis() : lastModified;
2121
}
2222

2323
public void setUnencryptedName(String unencryptedName) {
@@ -54,9 +54,6 @@ public String getMimeType() {
5454

5555
@Override
5656
public int compareTo(CursorFile o) {
57-
if (o.isDirectory) {
58-
return 1;
59-
}
6057
return Long.compare(o.lastModified, this.lastModified);
6158
}
6259
}

0 commit comments

Comments
 (0)