Used lines extension instead of split

Co-authored-by: Naveen Singh <36371707+naveensingh@users.noreply.github.com>
This commit is contained in:
Agnieszka C
2025-03-20 10:29:38 +00:00
committed by GitHub
parent 70b82194e1
commit cb3278e6c6

View File

@@ -68,7 +68,7 @@ class NewChecklistItemDialog(val activity: Activity, callback: (titles: ArrayLis
}
}
titleEditText.onTextChangeListener { text ->
val lines = text.split("\n").filter { it.trim().isNotEmpty() }
val lines = text.lines().filter { it.trim().isNotEmpty() }
if (lines.size > 1) {
lines.forEachIndexed { i, line ->
if (i == 0) {