From 311b6c757904ed50eff6d35eda9fabb1194ce167 Mon Sep 17 00:00:00 2001 From: Florian Dreier Date: Sat, 20 Jan 2018 16:58:52 +0100 Subject: [PATCH] Fixed all training's dispersion pattern file name --- .../features/statistics/DispersionPatternActivity.kt | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/app/src/main/java/de/dreier/mytargets/features/statistics/DispersionPatternActivity.kt b/app/src/main/java/de/dreier/mytargets/features/statistics/DispersionPatternActivity.kt index 802246993..07c0b6110 100644 --- a/app/src/main/java/de/dreier/mytargets/features/statistics/DispersionPatternActivity.kt +++ b/app/src/main/java/de/dreier/mytargets/features/statistics/DispersionPatternActivity.kt @@ -121,12 +121,15 @@ class DispersionPatternActivity : ChildActivityBase() { } private fun getDefaultFileName(extension: EFileType): String { - val name = if (statistic.arrowName != null) { + var name = if (statistic.arrowName != null) { statistic.arrowName!! + "-" + getString(R.string.arrow_number_x, statistic.arrowNumber) } else { statistic.exportFileName } - return getString(R.string.dispersion_pattern) + "-" + name + "." + extension.name.toLowerCase() + if (!name.isNullOrEmpty()) { + name = "-" + name + } + return getString(R.string.dispersion_pattern) + name + "." + extension.name.toLowerCase() } companion object {