Fix small issues, improve Result.flatMap

This commit is contained in:
Jorge Martín 2023-05-29 13:58:29 +02:00
parent 698e08573b
commit 87990c425c
7 changed files with 97 additions and 16 deletions

View file

@ -357,5 +357,11 @@ internal fun MessagesViewDarkPreview(@PreviewParameter(MessagesStateProvider::cl
@Composable
private fun ContentToPreview(state: MessagesState) {
MessagesView(state, {}, {}, {}, {})
MessagesView(
state = state,
onBackPressed = {},
onRoomDetailsClicked = {},
onEventClicked = {},
onPreviewAttachments = {}
)
}

View file

@ -23,14 +23,12 @@ interface LocalMediaFactory {
/**
* This method will create a [LocalMedia] with the given [MediaFile] and [mimeType].
*
*/
fun createFromMediaFile(mediaFile: MediaFile, mimeType: String?): LocalMedia
/**
* This method will create a [LocalMedia] with the given [uri] and [mimeType]
* If the [mimeType] is null, it'll try to read it from the content.
*
*/
fun createFromUri(uri: Uri, mimeType: String?): LocalMedia
}