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,9 +191,10 @@ class MainActivity : SimpleActivity() {
} }
private fun goHome() { private fun goHome() {
if (config.homeFolder != fragment.currentPath) if (config.homeFolder != fragment.currentPath) {
openPath(config.homeFolder) openPath(config.homeFolder)
} }
}
private fun showSortingDialog() { private fun showSortingDialog() {
ChangeSortingDialog(this, fragment.currentPath) { ChangeSortingDialog(this, fragment.currentPath) {
@ -318,7 +319,7 @@ class MainActivity : SimpleActivity() {
} }
fun pickedPaths(paths: ArrayList<String>) { 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))) val clipData = ClipData("Attachment", arrayOf(paths.getMimeType()), ClipData.Item(newPaths.removeAt(0)))
newPaths.forEach { newPaths.forEach {