mirror of
https://github.com/SimpleMobileTools/Simple-Gallery.git
synced 2025-06-05 21:59:19 +02:00
try keeping old Last Modified after rotating when needed
This commit is contained in:
@@ -45,7 +45,7 @@ ext {
|
|||||||
}
|
}
|
||||||
|
|
||||||
dependencies {
|
dependencies {
|
||||||
compile 'com.simplemobiletools:commons:2.37.10'
|
compile 'com.simplemobiletools:commons:2.37.12'
|
||||||
compile 'com.davemorrissey.labs:subsampling-scale-image-view:3.7.2'
|
compile 'com.davemorrissey.labs:subsampling-scale-image-view:3.7.2'
|
||||||
compile 'com.theartofdev.edmodo:android-image-cropper:2.4.0'
|
compile 'com.theartofdev.edmodo:android-image-cropper:2.4.0'
|
||||||
compile 'com.bignerdranch.android:recyclerview-multiselect:0.2'
|
compile 'com.bignerdranch.android:recyclerview-multiselect:0.2'
|
||||||
|
@@ -507,6 +507,7 @@ class ViewPagerActivity : SimpleActivity(), ViewPager.OnPageChangeListener, View
|
|||||||
return@getFileOutputStream
|
return@getFileOutputStream
|
||||||
}
|
}
|
||||||
|
|
||||||
|
val oldLastModified = getCurrentFile().lastModified()
|
||||||
if (currPath.isJpg()) {
|
if (currPath.isJpg()) {
|
||||||
saveRotation(getCurrentFile(), tmpFile)
|
saveRotation(getCurrentFile(), tmpFile)
|
||||||
} else {
|
} else {
|
||||||
@@ -517,9 +518,14 @@ class ViewPagerActivity : SimpleActivity(), ViewPager.OnPageChangeListener, View
|
|||||||
deleteFile(selectedFile) {}
|
deleteFile(selectedFile) {}
|
||||||
}
|
}
|
||||||
copyFile(tmpFile, selectedFile)
|
copyFile(tmpFile, selectedFile)
|
||||||
scanPath(selectedFile.absolutePath) {}
|
scanFile(selectedFile) {}
|
||||||
toast(R.string.file_saved)
|
toast(R.string.file_saved)
|
||||||
|
|
||||||
|
if (config.keepLastModified) {
|
||||||
|
selectedFile.setLastModified(oldLastModified)
|
||||||
|
updateLastModified(selectedFile, oldLastModified)
|
||||||
|
}
|
||||||
|
|
||||||
it.flush()
|
it.flush()
|
||||||
it.close()
|
it.close()
|
||||||
mRotationDegrees = 0f
|
mRotationDegrees = 0f
|
||||||
|
Reference in New Issue
Block a user