From c17a79a7b422da6d4aee03168c57ce623a3c86b1 Mon Sep 17 00:00:00 2001 From: Tibor Kaputa Date: Sat, 10 Jun 2023 09:15:11 +0200 Subject: [PATCH] shortening some code --- .../keyboard/helpers/MyKeyboard.kt | 34 ++++--------------- 1 file changed, 7 insertions(+), 27 deletions(-) diff --git a/app/src/main/kotlin/com/simplemobiletools/keyboard/helpers/MyKeyboard.kt b/app/src/main/kotlin/com/simplemobiletools/keyboard/helpers/MyKeyboard.kt index ccba189..fb90bdf 100644 --- a/app/src/main/kotlin/com/simplemobiletools/keyboard/helpers/MyKeyboard.kt +++ b/app/src/main/kotlin/com/simplemobiletools/keyboard/helpers/MyKeyboard.kt @@ -230,33 +230,13 @@ class MyKeyboard { */ fun getContentDescription(context: Context): CharSequence { return when (code) { - KEYCODE_SHIFT -> { - context.getString(R.string.keycode_shift) - } - - KEYCODE_MODE_CHANGE -> { - context.getString(R.string.keycode_mode_change) - } - - KEYCODE_ENTER -> { - context.getString(R.string.keycode_enter) - } - - KEYCODE_DELETE -> { - context.getString(R.string.keycode_delete) - } - - KEYCODE_SPACE -> { - context.getString(R.string.keycode_space) - } - - KEYCODE_EMOJI -> { - context.getString(R.string.emojis) - } - - else -> { - label - } + KEYCODE_SHIFT -> context.getString(R.string.keycode_shift) + KEYCODE_MODE_CHANGE -> context.getString(R.string.keycode_mode_change) + KEYCODE_ENTER -> context.getString(R.string.keycode_enter) + KEYCODE_DELETE -> context.getString(R.string.keycode_delete) + KEYCODE_SPACE -> context.getString(R.string.keycode_space) + KEYCODE_EMOJI -> context.getString(R.string.emojis) + else -> label } }