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())) val fileDirItems = arrayListOf(FileDirItem(currPath, currPath.getFilenameFromPath()))
tryCopyMoveFilesTo(fileDirItems, isCopyOperation) { tryCopyMoveFilesTo(fileDirItems, isCopyOperation) {
fixDateTaken(arrayListOf(currPath), false)
config.tempFolderPath = "" config.tempFolderPath = ""
if (!isCopyOperation) { if (!isCopyOperation) {
refreshViewPager() 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> val fileDirItems = paths.map { FileDirItem(it, it.getFilenameFromPath()) } as ArrayList<FileDirItem>
activity.tryCopyMoveFilesTo(fileDirItems, isCopyOperation) { activity.tryCopyMoveFilesTo(fileDirItems, isCopyOperation) {
activity.fixDateTaken(paths, false)
config.tempFolderPath = "" config.tempFolderPath = ""
listener?.refreshItems() listener?.refreshItems()
finishActMode() finishActMode()

View file

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