append get_content data as uris, not strings

This commit is contained in:
tibbi 2018-10-23 16:38:26 +02:00
parent fc47d41c40
commit d22d469eb3

View File

@ -191,8 +191,9 @@ class MainActivity : SimpleActivity() {
}
private fun goHome() {
if (config.homeFolder != fragment.currentPath)
if (config.homeFolder != fragment.currentPath) {
openPath(config.homeFolder)
}
}
private fun showSortingDialog() {
@ -318,7 +319,7 @@ class MainActivity : SimpleActivity() {
}
fun pickedPaths(paths: ArrayList<String>) {
val newPaths = paths.map { getFilePublicUri(File(it), BuildConfig.APPLICATION_ID).toString() } as ArrayList
val newPaths = paths.map { getFilePublicUri(File(it), BuildConfig.APPLICATION_ID) } as ArrayList
val clipData = ClipData("Attachment", arrayOf(paths.getMimeType()), ClipData.Item(newPaths.removeAt(0)))
newPaths.forEach {