show a better error message at fixing date taken values, if none found
This commit is contained in:
parent
17e7fb523d
commit
e2021bcc54
|
@ -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
|
||||
if (resultSize == 0) {
|
||||
didUpdateFile = false
|
||||
|
|
|
@ -958,7 +958,7 @@ fun Context.getFileDateTaken(path: String): Long {
|
|||
do {
|
||||
try {
|
||||
return cursor.getLongValue(MediaStore.Images.Media.DATE_TAKEN)
|
||||
} catch (e: Exception) {
|
||||
} catch (ignored: Exception) {
|
||||
}
|
||||
} while (cursor.moveToNext())
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue