Skip to content

Commit 820af7b

Browse files
committed
compose test
1 parent b3fb60c commit 820af7b

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

subs/compose/src/main/java/com/engineer/compose/ui/ComposeView.kt

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -113,7 +113,11 @@ fun MessageCard(msg: Message) {
113113
Toast.makeText(context, "you clicked me", Toast.LENGTH_SHORT).show()
114114
count++
115115
list.add(count.toString())
116-
kk.add(count.toString())
116+
if (kk.toList().size > 3) {
117+
kk[3] = count.toString()
118+
} else {
119+
kk.add(count.toString())
120+
}
117121
}) {
118122
Text(text = "click me")
119123
}

0 commit comments

Comments
 (0)