Remove modification date when not available

This commit is contained in:
J-Jamet committed 2020-09-01 12:00:08 +02:00
1 parent 2f5a846493
commit a394bb9f8e
1 file changed
+6 -2
@@ -60,8 +60,12 @@ class FileDatabaseInfo : Serializable {
fun getModificationString(): String? {
return documentFile?.lastModified()?.let {
DateFormat.getDateTimeInstance()
.format(Date(it))
if (it != 0L) {
DateFormat.getDateTimeInstance()
.format(Date(it))
} else {
null
}
}
}