public fun getSelectedAttachments(): List<Attachment> { val dataSet = if (attachmentsPickerMode == Files) files else images val selectedAttachments = dataSet.filter { it.isSelected } return storageHelper.getAttachmentsForUpload(selectedAttachments.map { it.attachmentMetaData }) }
Loads up the currently selected attachments. It uses the [attachmentsPickerMode] to know which attachments to use - files or images. It maps all files to a list of [Attachment] objects, based on their type.