after editing update exif first, the last modified
This commit is contained in:
parent
067caeeeeb
commit
5cc0a804b6
|
@ -122,7 +122,7 @@ class NewEditActivity : SimpleActivity() {
|
|||
toast(R.string.image_editing_failed)
|
||||
finish()
|
||||
} else {
|
||||
// the image is stored at the internal app storage first, for example /data/user/0/com.simplemobiletools.gallery.pro/files/editor/IMG_20191207_183023.jpg
|
||||
// the image is stored at the internal app storage first, for example /data/user/0/com.simplemobiletools.gallery.pro/cache/editor/IMG_20191207_183023.jpg
|
||||
// first we rename it to the desired name, then move
|
||||
val sourceString = Uri.decode(sourceImageUri.toString())?.toString() ?: ""
|
||||
val source = if (sourceString.isEmpty() || sourceString.startsWith("content")) {
|
||||
|
@ -182,11 +182,6 @@ class NewEditActivity : SimpleActivity() {
|
|||
|
||||
private val editCopyMoveListener = object : CopyMoveListener {
|
||||
override fun copySucceeded(copyOnly: Boolean, copiedAll: Boolean, destinationPath: String) {
|
||||
if (config.keepLastModified) {
|
||||
// add 1 s to the last modified time to properly update the thumbnail
|
||||
updateLastModified(destinationFilePath, sourceFileLastModified + 1000)
|
||||
}
|
||||
|
||||
try {
|
||||
if (isNougatPlus()) {
|
||||
val newExif = ExifInterface(destinationFilePath)
|
||||
|
@ -195,6 +190,11 @@ class NewEditActivity : SimpleActivity() {
|
|||
} catch (ignored: Exception) {
|
||||
}
|
||||
|
||||
if (config.keepLastModified) {
|
||||
// add 1 s to the last modified time to properly update the thumbnail
|
||||
updateLastModified(destinationFilePath, sourceFileLastModified + 1000)
|
||||
}
|
||||
|
||||
val paths = arrayListOf(destinationFilePath)
|
||||
rescanPaths(paths) {
|
||||
fixDateTaken(paths, false)
|
||||
|
|
Loading…
Reference in New Issue