diff --git a/app/src/main/java/de/mw136/tonuino/ui/ReadActivity.kt b/app/src/main/java/de/mw136/tonuino/ui/ReadActivity.kt index a2f8bff..49e9bda 100644 --- a/app/src/main/java/de/mw136/tonuino/ui/ReadActivity.kt +++ b/app/src/main/java/de/mw136/tonuino/ui/ReadActivity.kt @@ -45,9 +45,11 @@ class ReadActivity : NfcIntentActivity() { setText(R.id.mode, data.mode.value) findViewById(R.id.mode_description).apply { val mode = data.mode.value?.toInt() ?: 0 - text = if (mode in 1..6) { - resources.getStringArray(R.array.edit_mode)[mode - 1] + ": " + - resources.getStringArray(R.array.edit_mode_description)[mode - 1] + val title = resources.getStringArray(R.array.edit_mode)[mode - 1] ?: "" + val description = + resources.getStringArray(R.array.edit_mode_description)[mode - 1] ?: "" + text = if (title.isNotEmpty() && description.isNotEmpty()) { + "$title: $description" } else { Log.w( "$TAG:displayTonuinoInfo",