Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 932ea704 authored by Aurimas Liutikas's avatar Aurimas Liutikas Committed by Automerger Merge Worker
Browse files

Merge "Fix incompatibilities with Kotlin 1.5.0" am: 600dcaf9 am: 70ba49b0...

Merge "Fix incompatibilities with Kotlin 1.5.0" am: 600dcaf9 am: 70ba49b0 am: c61fdfd2 am: 4c9b195c

Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1697314

Change-Id: If062cccc2f003a1eda1b97ce599b459cea86656a
parents fb6649c4 4c9b195c
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -120,7 +120,7 @@ class ControlsUiControllerImpl @Inject constructor (
    private val onSeedingComplete = Consumer<Boolean> {
        accepted ->
            if (accepted) {
                selectedStructure = controlsController.get().getFavorites().maxBy {
                selectedStructure = controlsController.get().getFavorites().maxByOrNull {
                    it.controls.size
                } ?: EMPTY_STRUCTURE
                updatePreferences(selectedStructure)
+2 −2
Original line number Diff line number Diff line
@@ -43,8 +43,8 @@ inline infix fun Int.times(action: () -> Unit) {
 * cccc dd
 */
fun Iterable<Pair<String, String>>.columnize(separator: String = " | "): String {
    val col1w = map { (a, _) -> a.length }.max()!!
    val col2w = map { (_, b) -> b.length }.max()!!
    val col1w = map { (a, _) -> a.length }.maxOrNull()!!
    val col2w = map { (_, b) -> b.length }.maxOrNull()!!
    return map { it.first.padEnd(col1w) + separator + it.second.padEnd(col2w) }.joinToString("\n")
}