mirror of
https://github.com/FossifyOrg/Gallery.git
synced 2024-11-26 22:47:59 +01:00
show a better error message at fixing date taken values, if none found
This commit is contained in:
parent
17e7fb523d
commit
e2021bcc54
2 changed files with 9 additions and 1 deletions
|
@ -453,6 +453,14 @@ fun Activity.fixDateTaken(paths: ArrayList<String>, showToasts: Boolean, hasResc
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (!didUpdateFile) {
|
||||||
|
toast(R.string.no_date_takens_found)
|
||||||
|
runOnUiThread {
|
||||||
|
callback?.invoke()
|
||||||
|
}
|
||||||
|
return@ensureBackgroundThread
|
||||||
|
}
|
||||||
|
|
||||||
val resultSize = contentResolver.applyBatch(MediaStore.AUTHORITY, operations).size
|
val resultSize = contentResolver.applyBatch(MediaStore.AUTHORITY, operations).size
|
||||||
if (resultSize == 0) {
|
if (resultSize == 0) {
|
||||||
didUpdateFile = false
|
didUpdateFile = false
|
||||||
|
|
|
@ -958,7 +958,7 @@ fun Context.getFileDateTaken(path: String): Long {
|
||||||
do {
|
do {
|
||||||
try {
|
try {
|
||||||
return cursor.getLongValue(MediaStore.Images.Media.DATE_TAKEN)
|
return cursor.getLongValue(MediaStore.Images.Media.DATE_TAKEN)
|
||||||
} catch (e: Exception) {
|
} catch (ignored: Exception) {
|
||||||
}
|
}
|
||||||
} while (cursor.moveToNext())
|
} while (cursor.moveToNext())
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue