Skip to content

Commit 1da0699

Browse files
committed
code refactor
1 parent 27e890f commit 1da0699

File tree

1 file changed

+2
-6
lines changed

1 file changed

+2
-6
lines changed

core/ui/src/main/kotlin/ru/tech/imageresizershrinker/core/ui/widget/controls/selection/ImageFormatSelector.kt

+2-6
Original file line numberDiff line numberDiff line change
@@ -297,16 +297,12 @@ fun ImageFormatSelector(
297297

298298
@Composable
299299
private fun List<ImageFormatGroup>.filtered(): List<ImageFormatGroup> = remember(this) {
300-
if (Build.VERSION.SDK_INT <= 24) toMutableList().apply {
301-
removeAll(ImageFormatGroup.highLevelFormats)
302-
}
300+
if (Build.VERSION.SDK_INT <= 24) this - ImageFormatGroup.highLevelFormats.toSet()
303301
else this
304302
}
305303

306304
@Composable
307305
private fun List<ImageFormat>.filteredFormats(): List<ImageFormat> = remember(this) {
308-
if (Build.VERSION.SDK_INT <= 24) toMutableList().apply {
309-
removeAll(ImageFormat.highLevelFormats)
310-
}
306+
if (Build.VERSION.SDK_INT <= 24) this - ImageFormat.highLevelFormats.toSet()
311307
else this
312308
}

0 commit comments

Comments
 (0)