mirror of
https://github.com/Suwayomi/TachideskJUI.git
synced 2025-12-10 06:42:05 +01:00
Automatic Lint
This commit is contained in:
@@ -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
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user