Remove modification date when not available

This commit is contained in:
J-Jamet
2020-09-01 12:00:08 +02:00
parent 2f5a846493
commit a394bb9f8e

View File

@@ -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
}
}
}