Skip to content

Commit bdcec3b

Browse files
leandroBorgesFerreiraLeandro Ferreira
andauthored
UI fixes (#502)
* Fixing title erase * fixing commands handling --------- Co-authored-by: Leandro Ferreira <[email protected]>
1 parent aed6a80 commit bdcec3b

File tree

3 files changed

+4
-4
lines changed

3 files changed

+4
-4
lines changed

gradle/libs.versions.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ mockk = "1.14.4"
2525
sqldelight = "2.1.0"
2626
ksp = "2.2.0-2.0.2"
2727
compose-multiplatform = "1.8.0-beta02"
28-
dag-command = "1.11.0"
28+
dag-command = "1.14.0"
2929
dokka = "2.0.0"
3030
firebase = "33.11.0"
3131
google-services = "4.4.2"

writeopia_models/src/commonMain/kotlin/io/writeopia/sdk/models/story/Tag.kt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,8 +29,8 @@ enum class Tag(val label: String) {
2929
}
3030

3131
fun isErasable() = when (this) {
32-
H1, H2, H3, H4, HIDDEN_HX, COLLAPSED, AI_SUGGESTION, FIRST_AI_SUGGESTION -> false
33-
HIGH_LIGHT_BLOCK -> true
32+
HIDDEN_HX, COLLAPSED, AI_SUGGESTION, FIRST_AI_SUGGESTION -> false
33+
H1, H2, H3, H4, HIGH_LIGHT_BLOCK -> true
3434
}
3535

3636
fun mustCarryOver() = when (this) {

writeopia_ui/src/commonMain/kotlin/io/writeopia/ui/edition/TextCommandHandler.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ class TextCommandHandler(
2222
}
2323

2424
fun handleCommand(text: String, step: StoryStep, position: Int): Boolean {
25-
if (excludeTypes.contains(step.type.number) || text.lastOrNull() != ' ') return false
25+
if (excludeTypes.contains(step.type.number) || !text.contains(' ')) return false
2626

2727
val textArray = text.split(" ")
2828
if (textArray.isEmpty()) return false

0 commit comments

Comments
 (0)