mirror of
https://github.com/FossifyOrg/Gallery.git
synced 2024-11-30 00:17:58 +01:00
if no Date Taken values have been fixed, show an error, not success
This commit is contained in:
parent
cdf87c0038
commit
de9d7f580f
1 changed files with 3 additions and 1 deletions
|
@ -313,6 +313,7 @@ class MediaAdapter(activity: BaseSimpleActivity, var media: MutableList<Thumbnai
|
|||
activity.toast(R.string.fixing)
|
||||
Thread {
|
||||
try {
|
||||
var didUpdateFile = false
|
||||
val operations = ArrayList<ContentProviderOperation>()
|
||||
val mediumDao = activity.galleryDB.MediumDao()
|
||||
val paths = getSelectedPaths()
|
||||
|
@ -343,10 +344,11 @@ class MediaAdapter(activity: BaseSimpleActivity, var media: MutableList<Thumbnai
|
|||
}
|
||||
|
||||
mediumDao.updateFavoriteDateTaken(path, timestamp)
|
||||
didUpdateFile = true
|
||||
}
|
||||
|
||||
activity.contentResolver.applyBatch(MediaStore.AUTHORITY, operations)
|
||||
activity.toast(R.string.dates_fixed_successfully)
|
||||
activity.toast(if (didUpdateFile) R.string.dates_fixed_successfully else R.string.unknown_error_occurred)
|
||||
activity.runOnUiThread {
|
||||
listener?.refreshItems()
|
||||
finishActMode()
|
||||
|
|
Loading…
Reference in a new issue