Automatic Lint

This commit is contained in:
Syer10
2022-10-12 01:57:12 +00:00
parent 5f10cbdc87
commit bcdccb547e
27 changed files with 107 additions and 43 deletions

View File

@@ -21,5 +21,7 @@ fun String.chop(count: Int, replacement: String = "…"): String {
fun String.addSuffix(char: Char): String {
return if (endsWith(char)) {
this
} else this + char
} else {
this + char
}
}

View File

@@ -65,5 +65,7 @@ fun <T> Preference<T>.getAsFlow(action: (suspend (T) -> Unit)? = null): Flow<T>
.onStart { emit(get()) }
return if (action != null) {
flow.onEach(action = action)
} else flow
} else {
flow
}
}