private fun loadAttachmentsData(attachmentsPickerMode: AttachmentsPickerMode) { if (attachmentsPickerMode == Images) {val images = storageHelper.getMedia().map { AttachmentPickerItemState(it, false) } this.images = images this.attachments = images this.files = emptyList() } else if (attachmentsPickerMode == Files) {val files = storageHelper.getFiles().map { AttachmentPickerItemState(it, false) } this.files = files this.attachments = files this.images = emptyList() } }
Loads the attachment data, based on the [AttachmentsPickerMode].