Skip to content

Commit 1e8bc02

Browse files
committed
fix emojis, shorten repeat interval
1 parent 01de4e4 commit 1e8bc02

3 files changed

Lines changed: 8 additions & 7 deletions

File tree

app/build.gradle.kts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ android {
1313
minSdk = 33
1414
targetSdk = 36
1515
versionCode = 1
16-
versionName = "0.0.8"
16+
versionName = "0.0.9"
1717

1818
testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner"
1919
}

ui/build.gradle.kts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ plugins {
88
}
99

1010
// for publishing
11-
val uiVersion = "0.0.8"
11+
val uiVersion = "0.0.9"
1212

1313
android {
1414
namespace = "com.thelightphone.lp3Keyboard.ui"

ui/src/main/java/com/thelightphone/lp3Keyboard/ui/Lp3KeyboardViewModel.kt

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ interface Lp3KeyboardViewModel : Lp3KeyboardCallback {
1616

1717
val defaultEmojis = listOf(
1818
"😅",
19-
"😅",
19+
"☺️",
2020
"🙃",
2121
"😍",
2222
"😜",
@@ -51,13 +51,14 @@ interface Lp3RepeatableKeyboardCallback : Lp3KeyboardCallback {
5151
class DefaultLp3KeyboardViewModel(
5252
private val delegateCallback: Lp3RepeatableKeyboardCallback,
5353
private val haptic: () -> Unit = {},
54-
private val showCloseButtonForLayout: (Layout) -> Boolean = { true }
54+
private val showCloseButtonForLayout: (Layout) -> Boolean = { true },
55+
initialLayout: Layout = LowerCaseLayout
5556
) : ViewModel(),
5657
Lp3KeyboardViewModel {
5758
var previousLayout: Layout? = null
5859
private set
5960

60-
override val layoutFlow: MutableStateFlow<Layout> = MutableStateFlow(LowerCaseLayout)
61+
override val layoutFlow: MutableStateFlow<Layout> = MutableStateFlow(initialLayout)
6162

6263
private fun setLayout(layout: Layout) {
6364
previousLayout = layoutFlow.value
@@ -68,14 +69,14 @@ class DefaultLp3KeyboardViewModel(
6869
override val optionsFlow = MutableStateFlow(
6970
KeyboardOptions(
7071
defaultEmojis,
71-
displayClose = true,
72+
displayClose = showCloseButtonForLayout(initialLayout),
7273
displayReturn = true,
7374
displayVoice = true
7475
)
7576
)
7677

7778
companion object {
78-
private const val REPEAT_INTERVAL_MS = 500L
79+
private const val REPEAT_INTERVAL_MS = 350L
7980
}
8081

8182
private val heldSpecialKeys = mutableMapOf<SpecialKey, Job>()

0 commit comments

Comments
 (0)