update the file in mediastore after rename, dont recreate

This commit is contained in:
tibbi 2017-06-01 23:08:35 +02:00
parent 39b39577e4
commit b1341a1c65
2 changed files with 3 additions and 5 deletions

View file

@ -29,5 +29,5 @@ ext {
propMinSdkVersion = 16
propTargetSdkVersion = propCompileSdkVersion
propVersionCode = 1
propVersionName = '2.19.0'
propVersionName = '2.19.2'
}

View file

@ -281,10 +281,8 @@ fun BaseSimpleActivity.renameFile(oldFile: File, newFile: File, callback: (succe
}
} else if (oldFile.renameTo(newFile)) {
newFile.setLastModified(System.currentTimeMillis())
deleteFromMediaStore(oldFile)
scanFile(newFile) {
callback(true)
}
updateInMediaStore(oldFile, newFile)
callback(true)
} else {
callback(false)
}