fix date taken values automatically after file copy/move

This commit is contained in:
tibbi 2019-08-10 20:38:40 +02:00
parent 9433184d6b
commit f43784e90a
3 changed files with 3 additions and 0 deletions

View File

@ -572,6 +572,7 @@ class ViewPagerActivity : SimpleActivity(), ViewPager.OnPageChangeListener, View
val fileDirItems = arrayListOf(FileDirItem(currPath, currPath.getFilenameFromPath()))
tryCopyMoveFilesTo(fileDirItems, isCopyOperation) {
fixDateTaken(arrayListOf(currPath), false)
config.tempFolderPath = ""
if (!isCopyOperation) {
refreshViewPager()

View File

@ -439,6 +439,7 @@ class DirectoryAdapter(activity: BaseSimpleActivity, var dirs: ArrayList<Directo
val fileDirItems = paths.map { FileDirItem(it, it.getFilenameFromPath()) } as ArrayList<FileDirItem>
activity.tryCopyMoveFilesTo(fileDirItems, isCopyOperation) {
activity.fixDateTaken(paths, false)
config.tempFolderPath = ""
listener?.refreshItems()
finishActMode()

View File

@ -326,6 +326,7 @@ class MediaAdapter(activity: BaseSimpleActivity, var media: MutableList<Thumbnai
config.tempFolderPath = ""
activity.applicationContext.rescanFolderMedia(it)
activity.applicationContext.rescanFolderMedia(fileDirItems.first().getParentPath())
activity.fixDateTaken(paths, false)
if (!isCopyOperation) {
listener?.refreshItems()
activity.updateFavoritePaths(fileDirItems, it)