fix #1005, share items in the order they were selected
This commit is contained in:
parent
028dd1e03b
commit
73fef1a737
3 changed files with 3 additions and 3 deletions
|
@ -61,7 +61,7 @@ android {
|
||||||
}
|
}
|
||||||
|
|
||||||
dependencies {
|
dependencies {
|
||||||
implementation 'com.simplemobiletools:commons:5.15.11'
|
implementation 'com.simplemobiletools:commons:5.15.14'
|
||||||
implementation 'com.theartofdev.edmodo:android-image-cropper:2.8.0'
|
implementation 'com.theartofdev.edmodo:android-image-cropper:2.8.0'
|
||||||
implementation 'androidx.multidex:multidex:2.0.1'
|
implementation 'androidx.multidex:multidex:2.0.1'
|
||||||
implementation 'it.sephiroth.android.exif:library:1.0.1'
|
implementation 'it.sephiroth.android.exif:library:1.0.1'
|
||||||
|
|
|
@ -595,7 +595,7 @@ class DirectoryAdapter(activity: BaseSimpleActivity, var dirs: ArrayList<Directo
|
||||||
listener?.refreshItems()
|
listener?.refreshItems()
|
||||||
}
|
}
|
||||||
|
|
||||||
private fun getSelectedItems() = dirs.filter { selectedKeys.contains(it.path.hashCode()) } as ArrayList<Directory>
|
private fun getSelectedItems() = selectedKeys.mapNotNull { getItemWithKey(it) } as ArrayList<Directory>
|
||||||
|
|
||||||
private fun getSelectedPaths() = getSelectedItems().map { it.path } as ArrayList<String>
|
private fun getSelectedPaths() = getSelectedItems().map { it.path } as ArrayList<String>
|
||||||
|
|
||||||
|
|
|
@ -394,7 +394,7 @@ class MediaAdapter(activity: BaseSimpleActivity, var media: MutableList<Thumbnai
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private fun getSelectedItems() = media.filter { selectedKeys.contains((it as? Medium)?.path?.hashCode()) } as ArrayList<Medium>
|
private fun getSelectedItems() = selectedKeys.mapNotNull { getItemWithKey(it) } as ArrayList<Medium>
|
||||||
|
|
||||||
private fun getSelectedPaths() = getSelectedItems().map { it.path } as ArrayList<String>
|
private fun getSelectedPaths() = getSelectedItems().map { it.path } as ArrayList<String>
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue