Skip to content

Commit

Permalink
Fix Android build
Browse files Browse the repository at this point in the history
  • Loading branch information
Syer10 committed Sep 2, 2024
1 parent 81d2e81 commit a5fd2df
Showing 1 changed file with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,9 @@ actual class FileChooser(
private val resultLauncher: ManagedActivityResultLauncher<String, Uri?>,
) {
actual fun launch(extension: String) {
resultLauncher.launch(MimeTypeMap.getSingleton().getMimeTypeFromExtension(extension))
val mime = MimeTypeMap.getSingleton()
.getMimeTypeFromExtension(extension) ?: return
resultLauncher.launch(mime)
}
}

Expand Down

0 comments on commit a5fd2df

Please sign in to comment.