diff options
Diffstat (limited to 'mediapicker/src')
-rw-r--r-- | mediapicker/src/main/kotlin/ca/allanwang/kau/mediapicker/MediaPickerActivityBase.kt | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/mediapicker/src/main/kotlin/ca/allanwang/kau/mediapicker/MediaPickerActivityBase.kt b/mediapicker/src/main/kotlin/ca/allanwang/kau/mediapicker/MediaPickerActivityBase.kt index 2adabf9..07e6d18 100644 --- a/mediapicker/src/main/kotlin/ca/allanwang/kau/mediapicker/MediaPickerActivityBase.kt +++ b/mediapicker/src/main/kotlin/ca/allanwang/kau/mediapicker/MediaPickerActivityBase.kt @@ -10,6 +10,8 @@ import android.support.v7.widget.LinearLayoutManager import android.support.v7.widget.RecyclerView import android.support.v7.widget.Toolbar import android.widget.TextView +import ca.allanwang.kau.adapters.selectedItems +import ca.allanwang.kau.adapters.selectionSize import ca.allanwang.kau.utils.* import com.mikepenz.google_material_typeface_library.GoogleMaterial @@ -50,14 +52,14 @@ abstract class MediaPickerActivityBase( MediaItem.bindEvents(adapter.fastAdapter) adapter.fastAdapter.withSelectionListener { _, _ -> - selectionCount.text = adapter.fastAdapter.selections.size.toString() + selectionCount.text = adapter.selectionSize.toString() } fab.apply { show() setIcon(GoogleMaterial.Icon.gmd_send) setOnClickListener { - val selection = adapter.fastAdapter.selectedItems + val selection = adapter.selectedItems if (selection.isEmpty()) { toast(R.string.kau_no_items_selected) } else { |