From bfad77b597e16431c014636fa609f207827bcb25 Mon Sep 17 00:00:00 2001 From: tibbi Date: Fri, 1 Sep 2017 15:17:11 +0200 Subject: [PATCH] minor code style updates --- .../gallery/fragments/PhotoFragment.kt | 16 ++++++---------- 1 file changed, 6 insertions(+), 10 deletions(-) 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)