Fix ktlint

This commit is contained in:
Lucas Lima 2020-09-15 23:29:34 -03:00
parent d367752b2d
commit 803dc2326d
No known key found for this signature in database
GPG key ID: C5EEF4C30BFBF8D7

View file

@ -84,7 +84,6 @@ class TutorialLevelFragment : Fragment(R.layout.fragment_tutorial_level) {
else -> append(it) else -> append(it)
} }
} }
} }
setTextColor( setTextColor(
Color.argb( Color.argb(
@ -107,7 +106,6 @@ class TutorialLevelFragment : Fragment(R.layout.fragment_tutorial_level) {
else -> append(it) else -> append(it)
} }
} }
} }
setTextColor( setTextColor(
Color.argb( Color.argb(
@ -123,13 +121,13 @@ class TutorialLevelFragment : Fragment(R.layout.fragment_tutorial_level) {
} }
private fun String.splitKeeping(str: String): List<String> { private fun String.splitKeeping(str: String): List<String> {
return this.split(str).flatMap {listOf(it, str)}.dropLast(1).filterNot {it.isEmpty()} return this.split(str).flatMap { listOf(it, str) }.dropLast(1).filterNot { it.isEmpty() }
} }
private fun String.splitKeeping(vararg targetStrings: String): List<String> { private fun String.splitKeeping(vararg targetStrings: String): List<String> {
var res = listOf(this) var res = listOf(this)
targetStrings.forEach { str -> targetStrings.forEach { str ->
res = res.flatMap {it.splitKeeping(str)} res = res.flatMap { it.splitKeeping(str) }
} }
return res return res
} }