minor cleanup and add comment

This commit is contained in:
Helium314 2024-05-27 20:21:59 +02:00
parent 7473d5b32b
commit 0f503389b3
4 changed files with 3 additions and 5 deletions

View file

@ -10,7 +10,6 @@ import android.content.res.TypedArray;
import android.view.View;
import helium314.keyboard.latin.R;
import helium314.keyboard.latin.settings.Settings;
public final class KeyPreviewDrawParams {
// XML attributes of {@link MainKeyboardView}.

View file

@ -11,7 +11,6 @@ import helium314.keyboard.keyboard.internal.KeyboardParams
import helium314.keyboard.keyboard.internal.keyboard_parser.floris.KeyData
import helium314.keyboard.keyboard.internal.keyboard_parser.floris.KeyLabel
import helium314.keyboard.keyboard.internal.keyboard_parser.floris.KeyType
import helium314.keyboard.keyboard.internal.keyboard_parser.floris.SimplePopups
import helium314.keyboard.keyboard.internal.keyboard_parser.floris.TextKeyData
import helium314.keyboard.latin.common.isEmoji
import helium314.keyboard.latin.define.DebugFlags

View file

@ -108,10 +108,11 @@ sealed interface KeyData : AbstractKeyData {
}
private fun getSpaceLabel(params: KeyboardParams): String =
if (params.mId.mElementId <= KeyboardId.ELEMENT_SYMBOLS_SHIFTED)
if (params.mId.isAlphaOrSymbolKeyboard)
"!icon/space_key|!code/key_space"
else "!icon/space_key_for_number_layout|!code/key_space"
// todo: emoji and language switch popups should actually disappear depending on current layout (including functional keys)
private fun getCommaPopupKeys(params: KeyboardParams): List<String> {
val keys = mutableListOf<String>()
if (!params.mId.mDeviceLocked)

View file

@ -11,7 +11,6 @@ import java.io.IOException
import java.io.InputStream
import java.io.UnsupportedEncodingException
import java.net.URLDecoder
import java.util.HashMap
import java.util.jar.JarFile
import kotlin.RuntimeException
@ -73,7 +72,7 @@ object JarUtils {
fun close(stream: Closeable?) {
try {
stream?.close()
} catch (e: IOException) {
} catch (_: IOException) {
}
}