diff --git a/app/src/main/kotlin/com/simplemobiletools/gallery/fragments/PhotoFragment.kt b/app/src/main/kotlin/com/simplemobiletools/gallery/fragments/PhotoFragment.kt index 3d634a516..dd0ccb737 100644 --- a/app/src/main/kotlin/com/simplemobiletools/gallery/fragments/PhotoFragment.kt +++ b/app/src/main/kotlin/com/simplemobiletools/gallery/fragments/PhotoFragment.kt @@ -123,13 +123,11 @@ class PhotoFragment : ViewPagerFragment() { } } - private fun degreesForRotation(orientation: Int): Int { - return when (orientation) { - 8 -> 270 - 3 -> 180 - 6 -> 90 - else -> 0 - } + private fun degreesForRotation(orientation: Int) = when (orientation) { + 8 -> 270 + 3 -> 180 + 6 -> 90 + else -> 0 } private fun rotateViaMatrix(original: Bitmap, orientation: Int): Bitmap { @@ -176,9 +174,7 @@ class PhotoFragment : ViewPagerFragment() { .load(medium.path) .apply(options) .listener(object : RequestListener { - override fun onLoadFailed(e: GlideException?, model: Any?, target: Target?, isFirstResource: Boolean): Boolean { - return false - } + override fun onLoadFailed(e: GlideException?, model: Any?, target: Target?, isFirstResource: Boolean) = false override fun onResourceReady(resource: Bitmap?, model: Any?, target: Target?, dataSource: DataSource?, isFirstResource: Boolean): Boolean { if (isFragmentVisible)