Skip to content

Commit 96e024d

Browse files
committed
fix: fix bug with empty key field
1 parent 8d4c82d commit 96e024d

File tree

7 files changed

+15
-15
lines changed

7 files changed

+15
-15
lines changed

app/src/main/kotlin/app/Editor.kt

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -100,21 +100,21 @@ fun Menu(
100100
horizontalArrangement = Arrangement.SpaceAround
101101
) {
102102
Button(onClick = {
103-
onAdd(keyString.toInt(), valueString)
103+
if (keyString.isNotEmpty()) onAdd(keyString.toInt(), valueString)
104104
keyString = ""
105105
valueString = ""
106106
}) {
107107
Icon(Icons.Default.Add, contentDescription = "Add")
108108
}
109109
Button(onClick = {
110-
onContains(keyString.toInt())
110+
if (keyString.isNotEmpty()) onContains(keyString.toInt())
111111
keyString = ""
112112
valueString = ""
113113
}) {
114114
Icon(Icons.Default.Search, contentDescription = "Contains")
115115
}
116116
Button(onClick = {
117-
onDelete(keyString.toInt())
117+
if (keyString.isNotEmpty()) onDelete(keyString.toInt())
118118
keyString = ""
119119
valueString = ""
120120
}) {

app/src/main/kotlin/app/graph/DrawableNode.kt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
/*
2-
* Copyright (c) 2023 teemEight
3-
* SPDX-License-Identifier: Apache-2.0
2+
* Copyright (c) 2023 teem-4
3+
* SPDX-License-Identifier: MIT
44
*/
55

66
package app.graph

app/src/main/kotlin/app/graph/GraphLine.kt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
/*
2-
* Copyright (c) 2023 teemEight
3-
* SPDX-License-Identifier: Apache-2.0
2+
* Copyright (c) 2023 teem-4
3+
* SPDX-License-Identifier: MIT
44
*/
55

66
package app.graph

app/src/main/kotlin/app/graph/GraphNode.kt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
/*
2-
* Copyright (c) 2023 teemEight
3-
* SPDX-License-Identifier: Apache-2.0
2+
* Copyright (c) 2023 teem-4
3+
* SPDX-License-Identifier: MIT
44
*/
55

66
package app.graph

app/src/main/kotlin/app/graph/GraphState.kt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
/*
2-
* Copyright (c) 2023 teemEight
3-
* SPDX-License-Identifier: Apache-2.0
2+
* Copyright (c) 2023 teem-4
3+
* SPDX-License-Identifier: MIT
44
*/
55

66
package app.graph

app/src/main/kotlin/app/graph/ScreenZoom.kt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
/*
2-
* Copyright (c) 2023 teemEight
3-
* SPDX-License-Identifier: Apache-2.0
2+
* Copyright (c) 2023 teem-4
3+
* SPDX-License-Identifier: MIT
44
*/
55

66
package app.graph

app/src/main/kotlin/app/graph/TreeGraph.kt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
/*
2-
* Copyright (c) 2023 teemEight
3-
* SPDX-License-Identifier: Apache-2.0
2+
* Copyright (c) 2023 teem-4
3+
* SPDX-License-Identifier: MIT
44
*/
55

66
package app.graph

0 commit comments

Comments
 (0)