diff --git a/app/build.gradle b/app/build.gradle index cd49f84cc..551e5a7a8 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -32,7 +32,7 @@ android { } dependencies { - compile 'com.simplemobiletools:commons:2.14.9' + compile 'com.simplemobiletools:commons:2.15.0' compile 'com.davemorrissey.labs:subsampling-scale-image-view:3.6.0' compile 'com.theartofdev.edmodo:android-image-cropper:2.3.1' compile 'com.bignerdranch.android:recyclerview-multiselect:0.2' diff --git a/app/src/main/kotlin/com/simplemobiletools/gallery/adapters/DirectoryAdapter.kt b/app/src/main/kotlin/com/simplemobiletools/gallery/adapters/DirectoryAdapter.kt index 20d6c0ff6..9ca45fddd 100644 --- a/app/src/main/kotlin/com/simplemobiletools/gallery/adapters/DirectoryAdapter.kt +++ b/app/src/main/kotlin/com/simplemobiletools/gallery/adapters/DirectoryAdapter.kt @@ -224,7 +224,7 @@ class DirectoryAdapter(val activity: SimpleActivity, val dirs: MutableList() val positions = multiSelector.selectedPositions if (positions.isEmpty()) @@ -234,14 +234,21 @@ class DirectoryAdapter(val activity: SimpleActivity, val dirs: MutableList, } } - private fun displayCopyDialog() { + private fun copyMoveTo(isCopyOperation: Boolean) { val files = ArrayList() val positions = multiSelector.selectedPositions positions.forEach { files.add(File(media[it].path)) } + + activity.copyMoveFilesTo(files, isCopyOperation) { + if (!isCopyOperation) { + listener?.refreshItems() + } + actMode?.finish() + } } private fun copyTo() { - + copyMoveTo(true) } private fun moveTo() { - + copyMoveTo(false) } fun selectAll() {