update the file in mediastore after rename, dont recreate
This commit is contained in:
parent
39b39577e4
commit
b1341a1c65
2 changed files with 3 additions and 5 deletions
|
@ -29,5 +29,5 @@ ext {
|
|||
propMinSdkVersion = 16
|
||||
propTargetSdkVersion = propCompileSdkVersion
|
||||
propVersionCode = 1
|
||||
propVersionName = '2.19.0'
|
||||
propVersionName = '2.19.2'
|
||||
}
|
||||
|
|
|
@ -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)
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue