Enable detekt rules UnnecessaryParentheses and cleanup the code.

This commit is contained in:
Benoit Marty 2023-07-20 18:05:37 +02:00
parent 2928073e22
commit c75eabbcb0
16 changed files with 27 additions and 23 deletions

View file

@ -91,7 +91,7 @@ class ImageCompressor @Inject constructor(
) {
val (width, height) = when (resizeMode) {
is ResizeMode.Approximate -> resizeMode.desiredWidth to resizeMode.desiredHeight
is ResizeMode.Strict -> (resizeMode.maxWidth / 2) to (resizeMode.maxHeight / 2)
is ResizeMode.Strict -> resizeMode.maxWidth / 2 to resizeMode.maxHeight / 2
is ResizeMode.None -> return
}
// Read bounds only