From bd4afa6ebf3adf92ea89a6e1e5b15a4727e4dd7d Mon Sep 17 00:00:00 2001 From: Unknown Date: Sun, 19 Aug 2018 17:11:56 +0200 Subject: [PATCH] Minor formatting fix --- .../mytargets/features/training/input/InputActivity.kt | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/app/src/main/java/de/dreier/mytargets/features/training/input/InputActivity.kt b/app/src/main/java/de/dreier/mytargets/features/training/input/InputActivity.kt index 7aff9ce1e..0fde49d96 100644 --- a/app/src/main/java/de/dreier/mytargets/features/training/input/InputActivity.kt +++ b/app/src/main/java/de/dreier/mytargets/features/training/input/InputActivity.kt @@ -186,8 +186,7 @@ class InputActivity : ChildActivityBase(), TargetViewBase.OnEndFinishedListener, @RequiresApi(api = Build.VERSION_CODES.LOLLIPOP) private fun setupTransitionListener() { - val sharedElementEnterTransition = window - .sharedElementEnterTransition + val sharedElementEnterTransition = window.sharedElementEnterTransition if (sharedElementEnterTransition != null && sharedElementEnterTransition is FabTransform) { transitionFinished = false window.sharedElementEnterTransition.addListener(object : TransitionAdapter() { @@ -366,10 +365,7 @@ class InputActivity : ChildActivityBase(), TargetViewBase.OnEndFinishedListener, private fun updateEnd() { targetView?.replaceWithEnd(data!!.currentEnd.shots, data!!.currentEnd.end.exact) - val totalEnds = if (data!!.currentRound.round.maxEndCount == null) - data!!.ends.size - else - data!!.currentRound.round.maxEndCount + val totalEnds = data!!.currentRound.round.maxEndCount ?: data!!.ends.size binding.endTitle.text = getString(R.string.end_x_of_y, data!!.endIndex + 1, totalEnds) binding.roundTitle.text = getString( R.string.round_x_of_y,