Skip to content

Commit

Permalink
refactor(capture-sdk): Reduce line length to fix the MaxLineLength
Browse files Browse the repository at this point in the history
…detekt issue

PM-86
  • Loading branch information
a-szotyori committed Aug 6, 2024
1 parent 9d1f0b7 commit fb7b804
Showing 1 changed file with 5 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -181,8 +181,11 @@ class FileChooserFragment : BottomSheetDialogFragment() {
try {
val uriList = when(activityResultUriList){
is Uri -> listOf(activityResultUriList)
is List<*> -> activityResultUriList.filterIsInstance<Uri>().takeIf { it.size == activityResultUriList.size }
?: throw IllegalArgumentException("List contains non-Uri elements")
is List<*> -> {
activityResultUriList.filterIsInstance<Uri>().takeIf {
it.size == activityResultUriList.size
} ?: throw IllegalArgumentException("List contains non-Uri elements")
}
else -> throw IllegalArgumentException("uri is neither Uri nor List<Uri>")
}
if (uriList.isNotEmpty()) {
Expand Down

0 comments on commit fb7b804

Please sign in to comment.